:root {
  --ink: #18202a;
  --muted: #697386;
  --line: #dde2e8;
  --surface: #ffffff;
  --surface-subtle: #f5f7f8;
  --canvas: #eef1f3;
  --sidebar: #121923;
  --sidebar-muted: #9ca7b8;
  --blue: #2166d1;
  --blue-soft: #eaf1fd;
  --green: #147d64;
  --green-soft: #e7f5f0;
  --amber: #a45a09;
  --amber-soft: #fff2de;
  --red: #b83235;
  --red-soft: #fdebec;
  --purple: #7551a6;
  --purple-soft: #f1ebf8;
  --shadow: 0 12px 34px rgba(27, 35, 48, .12);
}

/* Live operations and inventory use compact hierarchy instead of flat tables. */
details:not([open]) > :not(summary) { display: none; }
.legacy-livestream-table { display: none; }
.livestream-hierarchy, .direct-inventory-hierarchy { display: grid; gap: 10px; }
.livestream-hierarchy,
.livestream-platform-group,
.livestream-responsible-groups,
.livestream-responsible-group,
.livestream-session-list,
.livestream-session-card { min-width: 0; max-width: 100%; }
.livestream-platform-group, .livestream-responsible-group, .direct-inventory-company, .direct-inventory-employee { border: 1px solid var(--line); background: var(--surface); }
.livestream-platform-group > summary, .livestream-responsible-group > summary, .direct-inventory-company > summary, .direct-inventory-employee > summary { min-height: 48px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.livestream-platform-group > summary::-webkit-details-marker, .livestream-responsible-group > summary::-webkit-details-marker, .direct-inventory-company > summary::-webkit-details-marker, .direct-inventory-employee > summary::-webkit-details-marker { display: none; }
.livestream-platform-group > summary > span, .livestream-responsible-group > summary > span, .direct-inventory-company > summary > span, .direct-inventory-employee > summary > span { min-width: 0; display: flex; align-items: center; gap: 8px; }
.livestream-platform-group > summary > span,
.livestream-responsible-group > summary > span { overflow: hidden; }
.livestream-platform-group > summary strong,
.livestream-platform-group > summary small,
.livestream-responsible-group > summary strong,
.livestream-responsible-group > summary small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.livestream-platform-group > summary small, .livestream-responsible-group > summary small, .direct-inventory-company > summary small, .direct-inventory-employee > summary small { color: var(--muted); font-size: 12px; }
.livestream-responsible-groups, .direct-inventory-employee-groups { display: grid; gap: 8px; padding: 0 8px 8px 24px; }
.livestream-session-list, .direct-inventory-card-list { display: grid; gap: 8px; padding: 8px 12px 12px 32px; }
.livestream-platform-group:not([open]) > .livestream-responsible-groups,
.livestream-responsible-group:not([open]) > .livestream-session-list { display: none; }
.direct-inventory-hierarchy,
.direct-inventory-company,
.direct-inventory-employee { display: block; min-width: 0; }
.direct-inventory-company:not([open]) > .direct-inventory-employee-groups,
.direct-inventory-employee:not([open]) > .direct-inventory-card-list { display: none; }
.direct-inventory-company + .direct-inventory-company,
.direct-inventory-employee + .direct-inventory-employee { margin-top: 8px; }
.direct-inventory-company[open] > .direct-inventory-employee-groups,
.direct-inventory-employee[open] > .direct-inventory-card-list {
  position: relative;
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 0;
  overflow: visible;
}
.direct-inventory-card-list { gap: 8px; }
.direct-inventory-card { position: relative; flex: 0 0 auto; }
.livestream-session-card { border: 1px solid var(--line); padding: 12px 14px; cursor: pointer; background: var(--surface-subtle); }
.livestream-session-card:hover, .direct-inventory-card:hover { border-color: var(--blue); }
.livestream-session-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.livestream-session-card header > div { min-width: 0; }
.livestream-session-card header strong,
.livestream-session-card header small { overflow-wrap: anywhere; }
.livestream-session-card header small { display: block; margin-top: 4px; color: var(--muted); }
.livestream-session-card-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.livestream-session-metrics { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.livestream-session-detail { min-width: 0; }
.dialog:has(.livestream-session-detail),
.dialog:has(.livestream-schedule-dialog),
.dialog:has(.server-proxy-preview) { width: min(1320px, calc(100vw - 24px)); }
.livestream-session-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.livestream-session-detail-header > div { min-width: 0; }
.livestream-session-detail-header .secondary-button { flex: 0 0 auto; }
.livestream-detail-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
.livestream-monitor-stages { display: grid; gap: 2px; padding: 5px 0; }
.livestream-monitor-stages small { color: var(--muted); }
.livestream-duration-warning { margin-top: 10px; }
.livestream-detail-people { display: grid; gap: 8px; }
.livestream-detail-person { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); background: var(--surface-subtle); }
.livestream-detail-person strong, .livestream-detail-person small { display: block; }
.livestream-detail-person small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.livestream-detail-person span { color: var(--muted); font-size: 11px; }
.livestream-detail-product-table { min-width: 760px; }
.livestream-detail-notes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.livestream-detail-notes > div { min-width: 0; padding: 12px; border: 1px solid var(--line); background: var(--surface-subtle); }
.livestream-detail-notes p { margin: 6px 0 0; }
.livestream-detail-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.livestream-detail-links a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid var(--line); color: var(--blue); font-size: 11px; font-weight: 700; }
.livestream-detail-links svg { width: 14px; height: 14px; }
.livestream-detail-files { margin-top: 12px; }
.livestream-analysis-result { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 14px; align-items: start; padding: 14px; border-left: 3px solid var(--blue); background: #f4f8ff; }
.livestream-analysis-result h3 { margin: 0 0 6px; font-size: 15px; }
.livestream-analysis-result p { margin: 0; }
.livestream-analysis-score { display: grid; gap: 5px; padding-right: 12px; border-right: 1px solid #cddcf2; }
.livestream-analysis-score span { color: var(--muted); font-size: 10px; }
.livestream-analysis-score strong { font-size: 17px; }
.livestream-analysis-columns { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 10px; }
.livestream-analysis-columns section { min-width: 0; padding: 12px; border: 1px solid var(--line); background: var(--surface-subtle); }
.livestream-analysis-columns section.warning { border-color: #e4c4c4; background: var(--red-soft); }
.livestream-analysis-columns h4 { margin-bottom: 6px; }
.livestream-analysis-columns p { margin: 0; }
.livestream-session-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 0 0 auto; }
.livestream-analysis-status { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 10px; align-items: start; margin-bottom: 12px; padding: 11px 12px; border-left: 3px solid var(--blue); background: var(--blue-soft); }
.livestream-analysis-status.failed { border-left-color: var(--red); background: var(--red-soft); color: var(--red); }
.livestream-analysis-status svg { width: 18px; height: 18px; margin-top: 1px; }
.livestream-analysis-status strong, .livestream-analysis-status p { display: block; margin: 0; }
.livestream-analysis-status p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.livestream-report { border: 1px solid var(--line); background: var(--surface); }
.livestream-report-cover { display: grid; grid-template-columns: minmax(0,1fr) 130px; gap: 20px; align-items: center; padding: 20px; border-bottom: 1px solid var(--line); background: #f6f8fb; }
.livestream-report-cover > div:first-child { min-width: 0; }
.livestream-report-cover span { color: var(--blue); font-size: 11px; font-weight: 800; }
.livestream-report-cover h3 { margin: 5px 0 8px; font-size: 19px; }
.livestream-report-cover p { margin: 0; line-height: 1.75; }
.livestream-report-score { display: grid; justify-items: end; gap: 3px; padding-left: 18px; border-left: 1px solid var(--line); }
.livestream-report-score strong { font-size: 25px; }
.livestream-report-score small { color: var(--muted); font-size: 10px; }
.livestream-report-badges { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.livestream-report-badges span { padding: 4px 7px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 10px; font-weight: 700; }
.livestream-report-badges .verdict-excellent, .livestream-report-badges .verdict-good, .livestream-report-badges .risk-low { border-color: #b7d9ce; background: var(--green-soft); color: var(--green); }
.livestream-report-badges .verdict-needs_improvement, .livestream-report-badges .risk-medium { border-color: #ecd0a5; background: var(--amber-soft); color: var(--amber); }
.livestream-report-badges .risk-high { border-color: #e4b9bb; background: var(--red-soft); color: var(--red); }
.livestream-report-section { padding: 17px 20px; border-bottom: 1px solid var(--line); }
.livestream-report-section:last-child { border-bottom: 0; }
.livestream-report-section > h4 { margin: 0 0 12px; }
.livestream-findings-table { min-width: 680px; }
.livestream-findings-table td { vertical-align: top; white-space: normal; line-height: 1.55; }
.livestream-report-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.livestream-report-list { min-width: 0; padding: 13px 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.livestream-report-list h5 { margin: 0 0 8px; font-size: 12px; }
.livestream-report-list ul, .livestream-report-section.missing-data ul { margin: 0; padding-left: 18px; }
.livestream-report-list li, .livestream-report-section.missing-data li { margin: 5px 0; line-height: 1.55; }
.livestream-report-list.positive h5 { color: var(--green); }
.livestream-report-list.warning h5 { color: var(--amber); }
.livestream-report-list.danger h5 { color: var(--red); }
.livestream-recommendations { display: grid; gap: 0; border-top: 1px solid var(--line); }
.livestream-recommendation { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.livestream-recommendation > b { align-self: start; padding: 4px 6px; text-align: center; background: var(--surface-subtle); color: var(--muted); font-size: 10px; }
.livestream-recommendation.priority-p0 > b { background: var(--red-soft); color: var(--red); }
.livestream-recommendation.priority-p1 > b { background: var(--amber-soft); color: var(--amber); }
.livestream-recommendation strong, .livestream-recommendation p, .livestream-recommendation small { display: block; }
.livestream-recommendation p { margin: 4px 0; }
.livestream-recommendation small { color: var(--muted); }
.livestream-rule-list { display: grid; border-top: 1px solid var(--line); }
.livestream-rule-list article { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.livestream-rule-list p { margin: 4px 0 0; }
.livestream-rule-list a, .livestream-rule-list > article > span { display: inline-flex; align-items: center; justify-content: flex-start; gap: 5px; color: var(--blue); font-size: 11px; font-weight: 700; text-align: left; overflow-wrap: anywhere; }
.livestream-rule-list svg { width: 13px; height: 13px; }
.livestream-report-fold { border-top: 1px solid var(--line); }
.livestream-report-fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 12px 0; cursor: pointer; list-style: none; font-size: 15px; font-weight: 800; }
.livestream-report-fold > summary::-webkit-details-marker { display: none; }
.livestream-report-fold > summary svg { width: 18px; height: 18px; transition: transform .16s ease; }
.livestream-report-fold[open] > summary svg { transform: rotate(180deg); }
.livestream-report-fold-body { min-width: 0; padding: 0 0 18px; }
.livestream-report-fold-body, .livestream-report-fold-body * { overflow-wrap: anywhere; word-break: normal; }
.livestream-report-fold.missing-data > summary { color: var(--danger); }
.livestream-report-fold.missing-data ul { margin: 0; padding-left: 20px; }
.livestream-script-list { display: grid; gap: 10px; }
.livestream-script-card { display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 14px; padding: 14px; border: 1px solid var(--line); background: var(--panel-soft); }
.livestream-script-card > b { color: var(--blue); }
.livestream-script-card strong { display: block; margin-bottom: 8px; font-size: 14px; line-height: 1.7; }
.livestream-script-card p { display: grid; grid-template-columns: 70px minmax(0,1fr); gap: 8px; margin: 5px 0; color: var(--muted); line-height: 1.6; }
.livestream-script-card p span { color: var(--text); font-weight: 700; }
.livestream-script-card small, .report-source-help { display: block; margin-top: 8px; color: var(--muted); line-height: 1.6; }
.livestream-source-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.livestream-source-list li { display: grid; grid-template-columns: 26px minmax(0,1fr) 24px; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.livestream-source-list li > b { display: grid; width: 24px; height: 24px; place-items: center; background: var(--blue-soft); color: var(--blue); font-size: 10px; }
.livestream-source-list p { margin: 3px 0 0; color: var(--muted); }
.livestream-source-list a { color: var(--blue); }
.livestream-source-list svg { width: 15px; height: 15px; }
.livestream-report-section.missing-data { border-left: 3px solid var(--amber); background: var(--amber-soft); }
.distribution-assessment { margin: 0 20px; }
.distribution-assessment.state-danger > summary { color: var(--red); }
.distribution-assessment.state-warning > summary { color: var(--amber); }
.distribution-assessment.state-positive > summary { color: var(--green); }
.distribution-assessment-head { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 14px 16px; border-left: 4px solid var(--muted); background: var(--surface-subtle); }
.distribution-assessment.state-danger .distribution-assessment-head { border-color: var(--red); background: var(--red-soft); }
.distribution-assessment.state-warning .distribution-assessment-head { border-color: var(--amber); background: var(--amber-soft); }
.distribution-assessment.state-positive .distribution-assessment-head { border-color: var(--green); background: var(--green-soft); }
.distribution-assessment-head span, .distribution-assessment-head strong, .distribution-assessment-head small { display: block; }
.distribution-assessment-head span, .distribution-assessment-head small { color: var(--muted); font-size: 11px; }
.distribution-assessment-head strong { margin: 4px 0; font-size: 17px; }
.distribution-assessment-head > b { font-size: 28px; }
.distribution-assessment-head > b small { display: inline; font-size: 11px; }
.distribution-assessment-meta { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0; }
.distribution-assessment-meta span { padding: 5px 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 11px; }
.distribution-comparison { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.distribution-comparison > div { padding: 9px 11px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.distribution-comparison span, .distribution-comparison strong { display: block; }
.distribution-comparison span { color: var(--muted); font-size: 10px; }
.distribution-comparison strong { margin-top: 4px; }
.distribution-evidence-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 10px 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.distribution-evidence { padding: 11px 13px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.distribution-evidence h5 { margin: 0 0 7px; font-size: 12px; }
.distribution-evidence ul { margin: 0; padding-left: 18px; }
.distribution-evidence li { margin: 4px 0; line-height: 1.55; }
.distribution-evidence p { margin: 0; color: var(--muted); }
.distribution-evidence.direct h5 { color: var(--red); }
.distribution-evidence.supporting h5 { color: var(--amber); }
.distribution-evidence.missing h5 { color: var(--red); }
.distribution-guardrail { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.livestream-platform-group > summary > i:last-child, .livestream-responsible-group > summary > i:last-child { flex: 0 0 auto; width: 15px; height: 15px; color: var(--muted); transition: transform .16s ease; }
.livestream-platform-group[open] > summary > i:last-child, .livestream-responsible-group[open] > summary > i:last-child { transform: rotate(90deg); }
.livestream-platform-group > summary:hover, .livestream-responsible-group > summary:hover { background: var(--surface-subtle); }
.livestream-platform-group > summary > b { color: var(--blue); white-space: nowrap; }
.livestream-platform-group > .livestream-responsible-groups { border-top: 1px solid var(--line); }
.livestream-responsible-group > summary { background: var(--surface-subtle); }
.livestream-responsible-group > summary > span { overflow: hidden; }
.livestream-responsible-group > summary strong, .livestream-responsible-group > summary small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.livestream-plan-section { margin-top: 18px; }
.manual-livestream-schedule { margin-top: 12px; border-top: 3px solid var(--green); }
.manual-schedule-table { min-width: 980px; }
.manual-schedule-fold { margin-top: 8px; border-top: 1px solid var(--line); }
.manual-schedule-fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 4px; cursor: pointer; list-style: none; color: var(--ink); }
.manual-schedule-fold > summary::-webkit-details-marker { display: none; }
.manual-schedule-fold > summary small { color: var(--muted); font-size: 11px; }
.manual-schedule-status-groups { display: grid; gap: 8px; margin-top: 8px; }
.manual-schedule-status-group { border: 1px solid var(--line); background: var(--surface); }
.manual-schedule-status-group > summary { min-height: 44px; padding: 9px 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
.manual-schedule-status-group > summary::-webkit-details-marker { display: none; }
.manual-schedule-status-group > summary > span { display: flex; align-items: baseline; gap: 9px; min-width: 0; flex-wrap: wrap; }
.manual-schedule-status-group > summary strong { font-size: 14px; }
.manual-schedule-status-group > summary small { color: var(--muted); font-size: 11px; }
.manual-schedule-status-group > summary > i { width: 15px; height: 15px; color: var(--muted); transition: transform .16s ease; flex: 0 0 auto; }
.manual-schedule-status-group[open] > summary > i { transform: rotate(90deg); }
.manual-schedule-status-group > summary:hover { background: var(--surface-subtle); }
.manual-schedule-status-group .data-table-wrap { border-top: 1px solid var(--line); }
.product-improvement-fold { margin-top: 8px; border-top: 1px solid var(--line); }
.product-improvement-fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 4px; cursor: pointer; list-style: none; }
.product-improvement-fold > summary::-webkit-details-marker { display: none; }
.product-improvement-fold > summary small { color: var(--muted); font-size: 11px; }
.manual-schedule-table td > small { display: block; margin-top: 4px; color: var(--muted); max-width: 260px; white-space: normal; }
.manual-schedule-table .row-actions { display: flex; gap: 6px; }
.manual-schedule-exception { margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.manual-schedule-exception .secondary-button { flex: 0 0 auto; }
.livestream-week-slots { color: var(--blue) !important; font-weight: 700; }
@media (max-width: 640px) {
  .manual-livestream-schedule .section-header, .manual-schedule-exception { align-items: stretch; flex-direction: column; }
  .manual-livestream-schedule .inline-header { width: 100%; justify-content: space-between; }
}
.livestream-plan-hierarchy { display: grid; gap: 8px; }
.livestream-plan-date-group, .livestream-plan-platform-group { border: 1px solid var(--line); background: var(--surface); }
.livestream-plan-date-group > summary, .livestream-plan-platform-group > summary { min-height: 44px; padding: 9px 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
.livestream-plan-date-group > summary::-webkit-details-marker, .livestream-plan-platform-group > summary::-webkit-details-marker { display: none; }
.livestream-plan-date-group > summary > span, .livestream-plan-platform-group > summary > span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.livestream-plan-date-group > summary small, .livestream-plan-platform-group > summary small { color: var(--muted); font-size: 11px; }
.livestream-plan-date-group > summary > i, .livestream-plan-platform-group > summary > i { width: 15px; height: 15px; color: var(--muted); transition: transform .16s ease; }
.livestream-plan-date-group[open] > summary > i, .livestream-plan-platform-group[open] > summary > i { transform: rotate(90deg); }
.livestream-plan-platform-groups { display: grid; gap: 7px; padding: 0 8px 8px 22px; }
.livestream-plan-list { display: grid; gap: 7px; padding: 7px 10px 10px 28px; }
.livestream-plan-row { display: grid; grid-template-columns: minmax(230px,1.25fr) minmax(150px,.75fr) minmax(170px,.85fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); background: var(--surface-subtle); }
.livestream-plan-row > div { min-width: 0; }
.livestream-plan-main strong, .livestream-plan-main small, .livestream-plan-main p, .livestream-plan-status small, .livestream-plan-monitor small { display: block; }
.livestream-plan-main small, .livestream-plan-status small, .livestream-plan-monitor small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.livestream-plan-main p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.livestream-occurrence-timeline { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.livestream-occurrence-timeline span { display: inline-grid; gap: 1px; min-width: 92px; padding: 5px 7px; border: 1px solid var(--line); background: var(--surface); }
.livestream-occurrence-timeline strong, .livestream-occurrence-timeline small { margin: 0; font-size: 10px; line-height: 1.3; }
.livestream-occurrence-timeline .occurrence-positive { border-color: #8bc8a5; background: #effaf3; }
.livestream-occurrence-timeline .occurrence-danger { border-color: #e6a2a2; background: #fff3f3; }
.livestream-plan-source-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.livestream-plan-source-links a, .livestream-plan-source-links button { min-height: 28px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border: 1px solid #b8c9e7; background: var(--surface); color: var(--blue); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.livestream-plan-source-links svg { width: 13px; height: 13px; }
.server-proxy-preview { display: grid; gap: 14px; }
.server-proxy-preview > header { display: grid; grid-template-columns: 28px minmax(0,1fr); align-items: start; gap: 10px; padding: 14px; border-left: 4px solid var(--amber); background: var(--amber-soft); }
.server-proxy-preview.positive > header { border-color: var(--green); background: var(--green-soft); }
.server-proxy-preview > header svg { width: 24px; height: 24px; }
.server-proxy-preview > header strong, .server-proxy-preview > header small { display: block; }
.server-proxy-preview > header small { margin-top: 4px; color: var(--muted); }
.server-proxy-preview dl { margin: 0; border-top: 1px solid var(--line); }
.server-proxy-preview dl > div { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.server-proxy-preview dt { color: var(--muted); }
.server-proxy-preview dd { margin: 0; overflow-wrap: anywhere; }
.livestream-plan-status .status-tag { display: inline-flex; }
.livestream-plan-monitor { color: var(--ink); }
@media (max-width: 980px) { .livestream-plan-row { grid-template-columns: minmax(0,1fr) minmax(150px,.7fr) auto; } .livestream-plan-monitor { grid-column: 1 / -1; } }
@media (max-width: 640px) { .livestream-plan-platform-groups, .livestream-plan-list { padding-left: 8px; } .livestream-plan-row { grid-template-columns: 1fr auto; } .livestream-plan-status { text-align: right; } .livestream-plan-monitor { grid-column: 1 / -1; } .livestream-plan-row .row-actions { grid-column: 1 / -1; justify-content: flex-start; } }
.direct-inventory-card { display: grid; grid-template-columns: auto minmax(280px,.9fr) minmax(0,1.2fr) 170px; align-items: start; gap: 10px; border: 1px solid var(--line); padding: 9px 10px; background: var(--surface-subtle); }
.inventory-export-check { min-width: 58px; padding: 6px 8px; border: 1px solid var(--line); background: var(--surface); }
.inventory-export-select-all { min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); background: var(--surface); }
.direct-inventory-card-details { min-width: 0; display: grid; gap: 10px; }
.inventory-spec-summary-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:6px; }
.inventory-spec-summary { min-width:0; display:grid; grid-template-columns:auto auto auto; align-items:center; gap:4px 10px; padding:7px 9px; border:1px solid var(--line); background:var(--surface); font-size:12px; }
.inventory-spec-summary strong { color:var(--red); font-size:13px; }
.inventory-spec-summary span { color:var(--green); font-weight:700; }
.inventory-spec-summary .inventory-spec-selling-price { color:var(--red); }
.inventory-spec-summary small { grid-column:1/-1; color:var(--muted); overflow-wrap:anywhere; }
.direct-inventory-card-facts.compact { margin-top:5px; gap:5px 12px; }
.inventory-spec-editor-row { position:relative; display:grid; gap:12px; margin-bottom:14px; padding:14px; border:1px solid #ccd6e2; border-radius:9px; background:#f8fafc; }
.inventory-spec-group { min-width:0; padding:12px; border:1px solid #dce3eb; border-radius:7px; background:var(--surface); }
.inventory-spec-group h4 { margin:0 0 10px; color:#34475c; font-size:13px; line-height:1.4; }
.inventory-spec-group-grid { display:grid; grid-template-columns:repeat(4,minmax(170px,1fr)); gap:11px 12px; }
.inventory-spec-group-cost .inventory-spec-group-grid,.inventory-spec-group-package .inventory-spec-group-grid { grid-template-columns:repeat(3,minmax(190px,1fr)); }
.inventory-spec-field { min-width:0; display:grid; align-content:end; gap:6px; color:#304156; font-weight:700; line-height:1.35; }
.inventory-spec-field > span { min-height:19px; white-space:normal; overflow-wrap:break-word; }
.inventory-spec-field input { width:100%; min-width:0; }
.inventory-spec-field-auto input,.inventory-spec-editor-row input[readonly] { background:#edf3f7; color:#36566f; font-weight:750; cursor:not-allowed; }
.inventory-packaging-weight-field { grid-template-columns:minmax(0,1fr) auto; align-items:center; padding:9px 10px 10px; border:1px solid transparent; border-radius:7px; }
.inventory-packaging-weight-field small { color:var(--muted); font-size:10px; font-weight:750; white-space:nowrap; }
.inventory-packaging-weight-field input { grid-column:1 / -1; }
.inventory-packaging-weight-field.is-default { border-color:#cdd4dc; background:#eceff2; }
.inventory-packaging-weight-field.is-default input { border-color:#bcc5cf; background:#e1e5e9; color:#5f6974; font-weight:800; }
.inventory-packaging-weight-field.is-manual { border-color:#b9d2f5; background:#f4f8ff; }
.inventory-packaging-weight-field.is-manual small { color:var(--blue); }
.inventory-spec-remove { position:absolute; top:10px; right:10px; z-index:1; }
.inventory-spec-editor-head { display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px 18px; margin-bottom:12px; color:var(--muted); font-size:12px; }
.inventory-spec-editor-head strong { color:#5d6874; }
.inventory-product-generated { display:grid; gap:10px; margin-top:12px; padding:14px; border:1px solid var(--line); background:var(--surface); }
.inventory-product-generated header strong,.inventory-product-generated header small { display:block; }
.inventory-product-generated header small { margin-top:3px; color:var(--muted); }
.inventory-detail-specifications { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; padding:8px 12px; border-top:1px solid var(--line); }
.inventory-detail-specifications>strong { grid-column:1/-1; color:var(--muted); }
.inventory-detail-specifications span { display:grid; padding:5px 7px; background:var(--surface-subtle); font-size:11px; }
.inventory-detail-specifications b { color:var(--red); }
.inventory-detail-specifications small { color:var(--muted); }
@media (max-width: 1100px) { .inventory-spec-group-grid,.inventory-spec-group-cost .inventory-spec-group-grid,.inventory-spec-group-package .inventory-spec-group-grid { grid-template-columns:repeat(2,minmax(170px,1fr)); } }
@media (max-width: 760px) { .inventory-spec-editor-row { padding:10px; } .inventory-spec-group { padding:10px; } .inventory-spec-group-grid,.inventory-spec-group-cost .inventory-spec-group-grid,.inventory-spec-group-package .inventory-spec-group-grid { grid-template-columns:1fr; } .inventory-spec-remove { top:7px; right:7px; } .inventory-spec-group h4 { padding-right:34px; } }
.inventory-fact-section, .inventory-shipping-options { min-width: 0; display: grid; gap: 7px; }
.inventory-group-label { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0; text-transform: uppercase; }
.direct-inventory-card-facts { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 12px; }
.direct-inventory-card-facts span { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.direct-inventory-card-facts .inventory-key-fact { color: var(--blue); font-weight: 700; }
.direct-inventory-card-facts .inventory-variant-name { color: var(--red); font-weight: 700; }
.direct-inventory-card-facts .inventory-sku-dimension { color: var(--blue); font-weight: 800; }
.direct-inventory-card-facts .inventory-bilingual-fact { display: inline-grid; grid-template-columns: auto auto; align-items: center; gap: 3px 7px; }
.direct-inventory-card-facts .inventory-bilingual-fact b { color: inherit; font-size: inherit; line-height: 1.05; }
.direct-inventory-card-facts .inventory-bilingual-fact b small { display: block; margin-top: 2px; color: #7f96ad; font-size: 9px; font-weight: 700; }
.direct-inventory-card-facts .inventory-packaging-fact { color: var(--blue); font-weight: 700; }
.direct-inventory-card-facts .inventory-shipping-total { color: var(--green); font-weight: 800; }
.direct-inventory-card-facts .inventory-supplier-stock { color: var(--green); font-weight: 700; }
.direct-inventory-card-facts .inventory-supplier-stock.needs-custom { color: var(--red); }
.direct-inventory-card-facts .inventory-total-cost { margin-left: auto; display: inline-flex; align-items: baseline; gap: 6px; flex-wrap: wrap; color: var(--ink); font-weight: 700; }
.direct-inventory-card-facts .inventory-total-cost strong { color: var(--blue); }
.direct-inventory-card-facts .inventory-total-cost small { color: var(--red); font-size: 11px; font-weight: 700; }
.direct-inventory-card-facts .inventory-status-tags { display: inline-flex; align-items: center; gap: 6px; }
.inventory-cost-comparison { min-width: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.inventory-cost-source { min-width: 0; display: grid; gap: 6px; padding: 9px 12px; }
.inventory-cost-source + .inventory-cost-source { border-left: 1px solid var(--line); }
.inventory-cost-source > div { display: flex; flex-wrap: wrap; gap: 7px 16px; }
.inventory-cost-source > div span { min-width: 0; overflow-wrap: anywhere; color: var(--muted); font-size: 12px; }
.inventory-cost-source strong { margin-left: 4px; font-size: 14px; }
.inventory-cost-source small { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.inventory-cost-source.suggested .inventory-group-label, .inventory-cost-source.suggested strong { color: #8a4b08; }
.inventory-cost-source.system .inventory-group-label, .inventory-cost-source.system strong { color: var(--blue); }
.direct-inventory-card > .row-actions { width: 170px; display: grid; grid-template-columns: repeat(3,40px); justify-content: end; align-items: start; gap: 8px; }
.direct-inventory-card > .row-actions .secondary-button { grid-column: 1 / -1; width: 100%; justify-content: center; }
.direct-inventory-section-controls { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.inventory-category-filter { position: relative; flex: 0 0 auto; }
.inventory-category-filter > summary { min-width: 132px; list-style: none; cursor: pointer; user-select: none; }
.inventory-category-filter > summary::-webkit-details-marker { display: none; }
.inventory-category-filter[open] > summary { border-color: var(--blue); color: var(--blue); }
.inventory-category-menu { position: absolute; z-index: 40; top: calc(100% + 7px); left: 0; width: 270px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 12px 32px rgba(15,23,42,.18); }
.inventory-category-menu-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.inventory-category-menu-head strong { font-size: 13px; }
.inventory-category-menu-head .text-button { padding: 0; font-size: 12px; }
.inventory-category-options { display: grid; max-height: 280px; overflow-y: auto; margin: 8px -4px; padding: 0 4px; }
.inventory-category-option { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 9px; padding: 8px; border-radius: 7px; cursor: pointer; }
.inventory-category-option:hover { background: var(--surface-subtle); }
.inventory-category-option input { width: 17px; height: 17px; margin: 0; }
.inventory-category-option span,.inventory-category-option strong,.inventory-category-option small { display: block; min-width: 0; }
.inventory-category-option strong { font-size: 13px; }
.inventory-category-option small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.inventory-category-add { width: 100%; justify-content: center; margin-top: 6px; }
.search-field.direct-inventory-search { width: min(360px, 40vw); min-width: 0; max-width: 100%; box-sizing: border-box; }
.direct-inventory-search input { width: 100%; min-width: 0; box-sizing: border-box; }
.inventory-search-empty { padding: 22px 14px; color: var(--muted); text-align: center; border: 1px dashed var(--line); }
.direct-inventory-card .shipping-quote-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
.direct-inventory-card .shipping-quote-line { background: var(--surface); }
.inventory-detail-card-preview { overflow: auto; padding: 12px; background: #f3f5f7; }
.inventory-detail-card-image-control { margin-bottom: 10px; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface); display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; }
.inventory-detail-card-image-control strong,.inventory-detail-card-image-control small { display: block; }
.inventory-detail-card-image-control small { margin-top: 3px; color: var(--muted); line-height: 1.5; }
.inventory-detail-card-image-control .form-hint { margin: 5px 0 0; }
.inventory-card-image-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.inventory-detail-card-image-control label.is-loading { opacity: .65; pointer-events: none; }
.inventory-detail-card { width: min(100%,1000px); margin: 0 auto; padding: 14px; color: #102a43; background: #fff; font-family: "Microsoft YaHei",Arial,sans-serif; }
.inventory-detail-card-brand { margin: 0 0 8px; color: #9a7735; font-family: Georgia,serif; font-size: 12px; font-weight: 700; }
.inventory-detail-card-frame { min-height: 500px; display: grid; grid-template-columns: 42% 58%; border: 1px solid #d8e1ea; }
.inventory-detail-card-image { min-width: 0; display: flex; align-items: center; justify-content: center; padding: 18px; background: #f7f7f4; }
.inventory-detail-card-image img { width: 100%; height: 100%; max-height: 470px; object-fit: contain; }
.inventory-detail-card-image-missing { color: #7b8794; }
.inventory-detail-card-copy { min-width: 0; display: grid; grid-template-rows: auto 1fr auto; }
.inventory-detail-card-copy header { padding: 20px 18px 8px; }
.inventory-detail-card-copy h1 { margin: 0 0 6px; font-size: 28px; line-height: 1.2; letter-spacing: 0; }
.inventory-detail-card-copy header p { margin: 0 0 7px; color: #6b7c93; }
.inventory-detail-card-copy header strong { color: #9a7735; }
.inventory-detail-card-copy dl { margin: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.inventory-detail-card-copy dl div { min-height: 64px; display: grid; grid-template-columns: 46% 54%; align-items: center; padding: 0 14px; border-top: 1px solid #d8e1ea; }
.inventory-detail-card-copy dl div:nth-child(odd) { border-right: 1px solid #d8e1ea; }
.inventory-detail-card-copy dt { color: #526d82; font-weight: 800; }
.inventory-detail-card-copy dt span,.inventory-detail-card-copy dt small { display: block; }
.inventory-detail-card-copy dt small { margin-top: 2px; color: #8ca0b2; font-size: 10px; letter-spacing: .02em; }
.inventory-detail-card-copy dd { min-width: 0; margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.inventory-detail-card-copy footer { display: grid; padding: 15px 18px; border-top: 1px solid #d8e1ea; }
.inventory-detail-card-copy footer > div { min-width: 0; }
.inventory-detail-card-copy footer > div + div { margin-top: 10px; padding-top: 10px; border-top: 1px solid #d8e1ea; }
.inventory-detail-card-copy .inventory-detail-selling strong { color: #b42318; }
.inventory-detail-card-copy .inventory-detail-selling small span { color: #b42318; }
.inventory-detail-card-copy footer small { color: #526d82; font-weight: 800; }
.inventory-detail-card-copy footer small span,.inventory-detail-card-copy footer small b { display: block; }
.inventory-detail-card-copy footer small b { margin-top: 2px; color: #8ca0b2; font-size: 10px; letter-spacing: .02em; }
.inventory-detail-card-copy footer strong { font-family: Georgia,serif; font-size: 34px; }
.inventory-detail-card-copy footer > span { color: #a0aec0; font-size: 10px; }
.live-product-sales { border: 1px solid var(--line); }
.live-product-list { display: grid; gap: 8px; margin: 8px 0 12px; }
.live-product-row { display: grid; grid-template-columns: minmax(220px,1fr) minmax(360px,1.5fr); gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); background: var(--surface-subtle); }
.live-product-row[hidden], .live-product-row.search-hidden { display: none !important; }
.live-product-row.selected { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 5%, var(--surface)); }
.live-product-search { width: min(520px,100%); margin-top: 8px; }
.live-product-search-status { display: block; min-height: 18px; margin: 5px 0 2px; }
.live-product-identity { min-width: 0; display: grid; gap: 8px; }
.live-product-heading { min-width: 0; display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 10px; align-items: center; }
.live-product-image { width: 56px; height: 56px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.live-product-image img { width: 100%; height: 100%; object-fit: contain; }
.live-product-image-placeholder { color: var(--muted); }
.live-product-identity > label:not(.check-line) { min-width: 0; font-size: 11px; color: var(--muted); }
.live-product-identity select, .live-product-identity input[type="text"] { width: 100%; margin-top: 4px; }
.live-product-row .check-line { min-width: 0; display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: center; gap: 8px; }
.live-product-row .check-line small { grid-column: 2; color: var(--muted); font-size: 11px; }
.live-product-inputs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.live-product-inputs label { min-width: 0; font-size: 11px; color: var(--muted); }
.live-product-inputs input { width: 100%; margin-top: 4px; }
details.livestream-dialog-section { padding: 0; overflow: hidden; }
.livestream-dialog-section > summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; cursor: pointer; font-weight: 800; color: var(--ink); list-style: none; }
.livestream-dialog-section > summary::-webkit-details-marker { display: none; }
.livestream-dialog-section > summary i { width: 18px; height: 18px; color: var(--muted); transition: transform .16s ease; }
.livestream-dialog-section[open] > summary { border-bottom: 1px solid var(--line); }
.livestream-dialog-section[open] > summary i { transform: rotate(180deg); }
.livestream-dialog-section-body { min-width: 0; padding: 12px 14px 14px; }
@media (max-width: 840px) {
  .direct-inventory-card, .live-product-row { grid-template-columns: 1fr; }
  .inventory-export-check { justify-self: start; }
  .direct-inventory-hierarchy, .direct-inventory-company, .direct-inventory-employee-groups, .direct-inventory-employee, .direct-inventory-card-list, .direct-inventory-card, .direct-inventory-card-details, .direct-inventory-card-facts { min-width: 0; max-width: 100%; }
  .direct-inventory-card, .direct-inventory-card-details, .direct-inventory-card-facts, .direct-inventory-card .shipping-quote-summary { width: 100%; }
  .direct-inventory-card-details { grid-template-columns: minmax(0,1fr); }
  .direct-inventory-card-facts span { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .direct-inventory-card-facts .inventory-total-cost { margin-left: 0; flex-basis: 100%; }
  .direct-inventory-section > .section-header { align-items: stretch; flex-direction: column; }
  .direct-inventory-section-controls, .search-field.direct-inventory-search { width: 100%; min-width: 0; max-width: 100%; }
  .direct-inventory-section-controls { align-items: stretch; justify-content: flex-start; }
  .inventory-category-filter { width: 100%; }
  .inventory-category-filter > summary { width: 100%; justify-content: center; }
  .inventory-category-menu { width: min(320px,calc(100vw - 48px)); }
  .direct-inventory-section-controls .analysis-badge { align-self: flex-start; }
  .direct-inventory-card .shipping-quote-summary { min-width: 0; max-width: 100%; grid-template-columns: minmax(0,1fr); }
  .direct-inventory-card .shipping-quote-line { min-width: 0; overflow-wrap: anywhere; }
  .inventory-cost-comparison { grid-template-columns: minmax(0,1fr); }
  .inventory-cost-source + .inventory-cost-source { border-left: 0; border-top: 1px solid var(--line); }
  .direct-inventory-card > .row-actions { width: 100%; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .direct-inventory-card > .row-actions .secondary-button { grid-column: 1 / -1; }
  .inventory-detail-card { min-width: 0; padding: 8px; }
  .inventory-detail-card-frame { min-height: 0; grid-template-columns: minmax(0,1fr); }
  .inventory-detail-card-image { aspect-ratio: 1 / 1; }
  .inventory-detail-card-copy h1 { font-size: 22px; }
  .inventory-detail-card-copy dl { grid-template-columns: minmax(0,1fr); }
  .inventory-detail-card-copy dl div:nth-child(odd) { border-right: 0; }
  .live-product-inputs { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .livestream-responsible-groups, .direct-inventory-employee-groups, .livestream-session-list, .direct-inventory-card-list { padding-left: 10px; }
  .livestream-session-detail-header { display: grid; }
  .livestream-session-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .livestream-session-actions button { width: 100%; justify-content: center; }
  .livestream-detail-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .livestream-detail-person { grid-template-columns: 1fr auto; }
  .livestream-detail-person b { grid-column: 1 / -1; }
  .livestream-detail-notes, .livestream-analysis-columns { grid-template-columns: 1fr; }
  .livestream-analysis-result { grid-template-columns: 1fr; }
  .livestream-analysis-score { grid-template-columns: 1fr auto; align-items: center; padding: 0 0 10px; border: 0; border-bottom: 1px solid #cddcf2; }
  .livestream-report-cover { grid-template-columns: 1fr; padding: 15px; }
  .livestream-report-score { grid-template-columns: 1fr auto; justify-items: stretch; align-items: end; padding: 11px 0 0; border: 0; border-top: 1px solid var(--line); }
  .livestream-report-score small { grid-column: 1 / -1; }
  .livestream-report-badges, .livestream-report-section { padding-left: 14px; padding-right: 14px; }
  .livestream-report-grid { grid-template-columns: 1fr; }
  .distribution-assessment { margin: 0 14px; }
  .distribution-evidence-grid, .distribution-comparison { grid-template-columns: 1fr; }
  .distribution-assessment-head { grid-template-columns: 1fr auto; }
  .livestream-rule-list article { grid-template-columns: 1fr; }
  .livestream-rule-list a, .livestream-rule-list > article > span { justify-content: flex-start; text-align: left; }
  .livestream-script-card { grid-template-columns: 1fr; }
  .livestream-script-card p { grid-template-columns: 1fr; }
}

.replenishment-hierarchy { display: grid; gap: 10px; }
.replenishment-company, .replenishment-employee { border: 1px solid var(--line); background: var(--surface); }
.replenishment-company > summary, .replenishment-employee > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.replenishment-company > summary::-webkit-details-marker, .replenishment-employee > summary::-webkit-details-marker { display: none; }
.replenishment-company > summary > span, .replenishment-employee > summary > span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.replenishment-company > summary small, .replenishment-employee > summary small { color: var(--muted); font-size: 12px; }
.replenishment-company > summary > b { color: var(--blue); }
.replenishment-employee-groups { padding: 0 10px 10px; display: grid; gap: 8px; }
.replenishment-plan-list { padding: 0 10px 10px; display: grid; gap: 8px; }
.replenishment-plan-card { display: grid; grid-template-columns: 72px minmax(0,1fr) auto; gap: 12px; align-items: start; padding: 12px; border: 1px solid var(--line); background: var(--surface-subtle); }
.replenishment-plan-media { width: 72px; height: 72px; }
.replenishment-image-button, .replenishment-image-placeholder { width: 72px; height: 72px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; padding: 0; overflow: hidden; }
.replenishment-image-button img, .replenishment-image-preview { width: 100%; height: 100%; object-fit: cover; display: block; }
.replenishment-image-placeholder { color: var(--muted); }
.replenishment-plan-main { min-width: 0; }
.replenishment-plan-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.replenishment-plan-facts { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.replenishment-progress { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); background: var(--surface); }
.replenishment-progress.overdue { border-color: color-mix(in srgb, var(--red) 38%, var(--line)); background: color-mix(in srgb, var(--red-soft) 48%, var(--surface)); }
.replenishment-progress-head, .replenishment-progress-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.replenishment-progress-head > span { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.replenishment-progress-head strong { font-size: 13px; }
.replenishment-progress-head small, .replenishment-progress-foot { color: var(--muted); font-size: 12px; }
.replenishment-progress-head b { color: var(--blue); font-size: 18px; white-space: nowrap; }
.replenishment-progress-track { position: relative; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; min-width: 300px; margin: 13px 4px 10px; }
.replenishment-progress-add-on .replenishment-progress-track { grid-template-columns: repeat(2,minmax(0,1fr)); }
.replenishment-progress-track::before { content: ''; position: absolute; left: 9%; right: 9%; top: 12px; height: 2px; background: var(--line); }
.replenishment-progress-step { position: relative; z-index: 1; display: grid; justify-items: center; gap: 3px; min-width: 0; text-align: center; }
.replenishment-progress-step strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; font-weight: 600; }
.replenishment-progress-step small { color: var(--muted); font-size: 10px; white-space: nowrap; }
.replenishment-progress-index { display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--muted); font-size: 11px; font-weight: 700; }
.replenishment-progress-step.complete .replenishment-progress-index { border-color: var(--green); background: var(--green); color: #fff; }
.replenishment-progress-step.complete strong { color: var(--green); }
.replenishment-progress-step.current .replenishment-progress-index { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.replenishment-progress-step.current strong { color: var(--blue); }
.replenishment-progress-step.risk .replenishment-progress-index { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.replenishment-progress-step.risk strong, .replenishment-progress-risk { color: var(--red) !important; }
.replenishment-progress-foot { flex-wrap: wrap; }
.replenishment-plan-shipping { margin-top: 8px; display: grid; gap: 3px; }
.analysis-note-inline { color: var(--blue); }
.replenishment-plan-actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 100px; }
.replenishment-image-upload { display: grid; grid-template-columns: 96px minmax(0,1fr); gap: 12px; align-items: center; }
.replenishment-image-upload > div { width: 96px; height: 96px; }
.replenishment-image-upload .replenishment-image-placeholder { width: 96px; height: 96px; }
.replenishment-image-upload .upload-box { min-height: 72px; }
.replenishment-image-upload > button { grid-column: 2; justify-self: start; }
.inventory-card-image-upload .inventory-image-quality { grid-column: 2; margin: 0; }
.inventory-card-image-upload .error-text { color: var(--red); }
.replenishment-image-viewer { min-height: 280px; display: grid; place-items: center; background: var(--surface-subtle); }
.replenishment-image-zoom { max-width: 100%; max-height: 65vh; object-fit: contain; }
.replenishment-form .config-block { margin-bottom: 0; }
.inventory-product-cell { display: flex; align-items: center; gap: 14px; min-width: 320px; }
.inventory-product-visual { width: 144px; flex: 0 0 144px; display: grid; justify-items: center; gap: 5px; }
.inventory-product-visual .inventory-image-button,
.inventory-product-visual .inventory-image-placeholder { width: 112px; height: 112px; }
.inventory-card-number { width: 112px; padding: 6px 4px; border: 1px solid var(--line); background: #fff; display: grid; justify-items: center; gap: 2px; }
.inventory-card-number strong { color: #111827; font: 800 24px/1.1 Arial, sans-serif; }
.inventory-card-number small, .inventory-card-number-pending { color: var(--muted); font-size: 10px; }
.inventory-image-button, .inventory-image-placeholder { width: 80px; height: 80px; flex: none; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; padding: 0; overflow: hidden; }
.archived-inventory-list { display: grid; gap: 8px; }
.archived-inventory-row { min-width: 0; display: grid; grid-template-columns: 80px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); background: var(--surface-subtle); }
.archived-inventory-row .inventory-product-cell { min-width: 0; }
.archived-inventory-row .inventory-image-button, .archived-inventory-row .inventory-image-placeholder { width: 64px; height: 64px; }
.inventory-image-button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.inventory-image-placeholder { color: var(--muted); }
.direct-inventory-section { margin-top: 12px; }

.inventory-scan-fact { color: var(--blue); font-weight: 800; }
.inventory-scan-form { display: grid; gap: 14px; }
.inventory-scan-form input[name="scan_code"] { min-height: 58px; font-size: 22px; letter-spacing: .04em; text-transform: uppercase; }

.inventory-scan-code-box { position: relative; display: block; }
.inventory-scan-code-box:focus-within { outline: 2px solid var(--accent, #2563eb); outline-offset: 1px; border-radius: 8px; }
.inventory-scan-result-card { border: 1px solid var(--line); background: var(--surface-subtle); padding: 16px; display: grid; gap: 16px; }
.inventory-scan-result-head { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: center; }
.inventory-scan-result-head h3 { margin: 0 0 6px; font-size: 22px; }
.inventory-scan-code-line { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.inventory-scan-code-line strong { color: var(--blue); }
.inventory-scan-detail-image { width: 112px; height: 112px; display: block; object-fit: contain; background: var(--surface); border: 1px solid var(--line); }
.inventory-scan-detail-image.inventory-image-placeholder { display: grid; place-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.inventory-scan-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.inventory-scan-facts span { min-width: 0; border-top: 1px solid var(--line); padding-top: 8px; overflow-wrap: anywhere; }
.inventory-scan-facts b { display: block; color: var(--muted); font-size: 11px; margin-bottom: 3px; }
.inventory-scan-facts b small { display: block; margin-top: 2px; color: #94a3b8; font-size: 9px; font-weight: 700; }
.field-english-label { display: block; margin: 2px 0 5px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.inventory-sku-dimensions legend span,.inventory-sku-dimensions legend small { display: block; }
.inventory-sku-dimensions legend small { margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .04em; }
.inventory-live-workspace { display: grid; grid-template-columns: minmax(380px,.85fr) minmax(520px,1.15fr); gap: 18px; align-items: start; }
.inventory-live-controller, .inventory-live-preview { min-width: 0; }
.inventory-live-actions { margin: 0 0 18px; padding: 16px; display: grid; gap: 10px; justify-items: start; border: 1px solid var(--line); background: var(--surface-subtle); }
.inventory-live-actions small { color: var(--muted); line-height: 1.65; }
.inventory-live-preview iframe { display: block; width: 100%; min-height: 620px; border: 1px solid var(--line); background: #f4f7fb; }
.inventory-label-workspace { display: grid; grid-template-columns: minmax(280px,.85fr) minmax(0,1.15fr); gap: 18px; align-items: start; }
.inventory-label-preview { min-width: 0; display: grid; justify-items: center; gap: 12px; padding: 16px; background: #e8ecf1; border: 1px solid var(--line); }
.inventory-label-preview > .eyebrow, .inventory-label-preview > .form-hint { width: 100%; }
.inventory-hang-tag { position: relative; width: 200px; height: 600px; display: grid; grid-template-rows: 200px 200px 200px; color: #0b0f14; background: transparent; overflow: hidden; filter: drop-shadow(0 10px 20px rgba(31,41,55,.12)); }
.inventory-hang-tag-facts { min-width: 0; padding: 12px 20px; display: flex; flex-direction: column; justify-content: center; border: 1px solid #334155; border-radius: 18px 18px 0 0; background: #fff; overflow: hidden; }
.inventory-hang-tag-facts strong { font: 800 20px/1.3 Arial,sans-serif; white-space: normal; overflow-wrap: anywhere; }
.inventory-hang-tag-facts strong.is-medium { font-size: 15px; }
.inventory-hang-tag-facts strong.is-long { font-size: 13px; }
.inventory-hang-tag-facts b { margin-top: 10px; font: 800 20px/1.3 Arial,sans-serif; white-space: normal; overflow-wrap: anywhere; }
.inventory-hang-tag-facts b.is-medium { font-size: 18px; }
.inventory-hang-tag-facts b.is-long { font-size: 16px; }
.inventory-hang-tag-facts span { margin-top: 7px; font: 500 12px/1.3 Arial,sans-serif; white-space: normal; overflow-wrap: anywhere; }
.inventory-hang-tag-perforation { display: none; }
.inventory-hang-tag-number-zone { min-width: 0; padding: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid #334155; border-top: 2px dashed #334155; border-radius: 0 0 18px 18px; background: #fff; overflow: hidden; }
.inventory-hang-tag-number-zone small { margin-bottom: 5px; color: #475569; font-size: 12px; }
.inventory-hang-tag-tail { position: relative; width: 48px; height: 200px; justify-self: center; border-left: 1px solid #334155; border-right: 1px solid #334155; background: #fff; }
.inventory-hang-tag-tail::after { content: ""; position: absolute; right: -24px; top: 24px; width: 24px; height: 60px; border: 1px solid #334155; border-left: 0; border-radius: 0 12px 12px 0; background: #fff; }
.inventory-label-source { min-width: 0; padding: 18px; border: 1px solid var(--line); background: var(--surface); }
.inventory-label-source h3 { margin: 0 0 12px; }
.inventory-label-source dl { margin: 0; display: grid; }
.inventory-label-source dl div { min-width: 0; display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.inventory-label-source dt { color: var(--muted); font-size: 12px; }
.inventory-label-source dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.inventory-dtpweb-status { margin: 16px 0 0; padding: 12px 14px; display: grid; gap: 6px; border: 1px solid color-mix(in srgb,var(--blue) 28%,var(--line)); border-left: 4px solid var(--blue); border-radius: 10px; background: var(--surface-subtle); color: var(--muted); }
.inventory-dtpweb-status strong { color: var(--ink); font-size: 14px; }
.inventory-dtpweb-status span { line-height: 1.55; }
.inventory-dtpweb-status.is-ready { border-color: color-mix(in srgb,var(--green) 38%,var(--line)); border-left-color: var(--green); background: color-mix(in srgb,var(--green) 7%,var(--surface)); }
.inventory-dtpweb-status.is-ready strong { color: var(--green); }
.inventory-dtpweb-status.is-error { border-color: color-mix(in srgb,var(--red) 32%,var(--line)); border-left-color: var(--red); background: color-mix(in srgb,var(--red) 6%,var(--surface)); }
.inventory-dtpweb-status.is-error strong { color: var(--red); }
.inventory-dtpweb-actions { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 8px; }
.inventory-dtpweb-actions [hidden] { display: none !important; }

@media (max-width: 720px) {
  .replenishment-plan-card { grid-template-columns: 56px minmax(0,1fr); }
  .replenishment-plan-media, .replenishment-image-button, .replenishment-image-placeholder { width: 56px; height: 56px; }
  .replenishment-plan-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .replenishment-image-upload { grid-template-columns: 80px minmax(0,1fr); }
  .replenishment-image-upload > div, .replenishment-image-upload .replenishment-image-placeholder { width: 80px; height: 80px; }
  .inventory-detail-card-image-control { grid-template-columns: minmax(0,1fr); }
  .inventory-detail-card-image-control label { width: 100%; justify-content: center; }
  .inventory-product-cell { min-width: 0; }
  .inventory-image-button, .inventory-image-placeholder { width: 72px; height: 72px; }
  .archived-inventory-row { grid-template-columns: minmax(0,1fr); align-items: stretch; }
  .archived-inventory-row .secondary-button { width: 100%; justify-content: center; }
  .inventory-scan-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-scan-result-head { grid-template-columns: 80px minmax(0, 1fr); }
  .inventory-scan-detail-image { width: 80px; height: 80px; }
  .inventory-live-workspace { grid-template-columns: minmax(0,1fr); }
  .inventory-live-preview iframe { min-height: 520px; }
  .inventory-label-workspace { grid-template-columns: minmax(0,1fr); }
  .replenishment-progress { overflow-x: auto; }
  .replenishment-progress-head, .replenishment-progress-foot { align-items: flex-start; }
  .replenishment-progress-head > span { flex-direction: column; gap: 2px; }
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); color: var(--ink); }
body { margin: 0; font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif; letter-spacing: 0; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(33, 102, 209, .22); outline-offset: 1px; }
.hidden { display: none !important; }
svg { width: 18px; height: 18px; display: block; flex: none; }

.auth-screen { min-height: 100vh; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); background: var(--surface); }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(42px, 5.5vw, 92px); }
.auth-panel-tututoo { background: var(--surface); }
.auth-panel-jiding { position: relative; overflow: hidden; background: #18212d; color: white; }
.auth-panel-jiding::before { content: ""; position: absolute; inset: 8% 8% auto auto; width: 44%; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.12); pointer-events: none; }
.auth-panel-jiding::after { content: ""; position: absolute; width: 34%; aspect-ratio: 1; right: 18%; top: 22%; border: 1px solid rgba(167,111,34,.32); transform: translate(45%,45%); pointer-events: none; }
.auth-panel-jiding > * { position: relative; z-index: 1; }
.auth-panel-jiding .eyebrow { color: #9fc8be; }
.auth-panel-jiding .auth-description { color: #c7d0dc; }
.auth-panel-jiding label { color: #e7edf4; }
.auth-panel-jiding input { border-color: #445163; background: #222d3b; color: white; }
.auth-panel-jiding input::placeholder { color: #97a4b5; }
.auth-panel-jiding .password-field .icon-button { color: #b9c4d2; }
.auth-panel-jiding .primary-button { background: #16806b; }
.auth-panel-jiding .primary-button:hover { background: #1a927a; }
.auth-panel-lanqier { position: relative; background: #eefaf8; color: #123b3a; }
.auth-panel-lanqier .eyebrow { color: #0f766e; }
.auth-panel-lanqier .auth-description { color: #466260; }
.auth-panel-lanqier > * { position: relative; z-index: 1; }
.auth-panel-lanqier .secondary-button { border-color: #8bc9c1; color: #0b5d57; }
.brand-mark-jiding { background: #16806b; font-size: 17px; }
.auth-boundary-note { width: min(100%,420px); display: grid; gap: 4px; margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.16); color: #aebaca; font-size: 12px; line-height: 1.6; }
.auth-boundary-note strong { color: white; }
.brand-mark { width: 52px; height: 52px; display: grid; place-items: center; background: var(--ink); color: white; border-radius: 8px; font-weight: 700; font-size: 24px; margin-bottom: 34px; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: uppercase; }
.auth-panel h1 { margin: 0; max-width: 500px; font-size: clamp(32px, 4vw, 52px); line-height: 1.18; font-weight: 700; }
.auth-description { margin: 22px 0 34px; color: var(--muted); max-width: 480px; line-height: 1.75; }
.auth-form { width: min(100%, 420px); display: grid; gap: 18px; }
label { color: #3c4654; font-size: 13px; font-weight: 600; }
input, select, textarea { width: 100%; margin-top: 8px; border: 1px solid #cfd6df; border-radius: 6px; background: var(--surface); color: var(--ink); padding: 11px 12px; min-height: 43px; }
.password-field { position: relative; margin-top: 8px; }
.password-field input { margin-top: 0; padding-right: 48px; }
.password-field .icon-button { position: absolute; right: 2px; top: 2px; min-height: 39px; width: 40px; }
textarea { min-height: 94px; resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #9aa3ae; }
.primary-button, .secondary-button, .ghost-button, .icon-text-button, .icon-button { border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; border-radius: 6px; padding: 0 15px; font-weight: 700; white-space: nowrap; }
.primary-button { background: var(--ink); color: white; }
.primary-button:hover { background: #273343; }
.secondary-button { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.secondary-button:hover { background: var(--surface-subtle); }
.ghost-button { background: transparent; color: var(--blue); padding-inline: 6px; }
.icon-button { width: 40px; padding: 0; background: transparent; color: var(--muted); }
.icon-button:hover { background: var(--surface-subtle); color: var(--ink); }
.icon-text-button { width: 100%; justify-content: flex-start; background: transparent; color: var(--sidebar-muted); padding: 0; }
.auth-form .primary-button { margin-top: 8px; min-height: 48px; }
.form-error { min-height: 22px; color: var(--red); font-size: 13px; }
.auth-local-tool-download{width:max-content;margin:8px 0 0;background:#edf7f3;font-weight:700}
.auth-aside { position: relative; overflow: hidden; min-height: 100vh; color: white; background: #18212d; }
.auth-aside::before { content: ""; position: absolute; inset: 8% 8% auto auto; width: 44%; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.14); }
.auth-aside::after { content: ""; position: absolute; width: 34%; aspect-ratio: 1; right: 18%; top: 22%; border: 1px solid rgba(167, 111, 34, .38); transform: translate(45%, 45%); }
.aside-content { position: absolute; z-index: 1; left: 9%; right: 9%; bottom: 11%; max-width: 590px; }
.aside-index { color: #b6c2d1; font-size: 12px; }
.aside-content h2 { margin: 16px 0; font-size: clamp(28px, 3vw, 44px); line-height: 1.2; }
.aside-content p { max-width: 510px; color: #c7d0dc; line-height: 1.8; }
.aside-rule { width: 100%; height: 1px; background: rgba(255,255,255,.25); margin: 32px 0 20px; }
.aside-content > span:last-child { font-size: 13px; color: #aab7c6; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; background: var(--sidebar); color: white; padding: 22px 14px 16px; display: flex; flex-direction: column; z-index: 20; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; border-bottom: 1px solid rgba(255,255,255,.09); }
.brand-mark-small { width: 36px; height: 36px; margin: 0; font-size: 17px; background: #e6ecf3; color: var(--sidebar); border-radius: 6px; }
.sidebar-brand strong, .sidebar-brand span { display: block; }
.sidebar-brand strong { font-size: 15px; }
.sidebar-brand span { color: var(--sidebar-muted); font-size: 11px; margin-top: 3px; }
.main-nav { flex: 1 1 auto; min-height: 0; display: grid; align-content: start; gap: 4px; margin-top: 22px; padding-right: 4px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #526176 transparent; }
.main-nav::-webkit-scrollbar { width: 6px; }
.main-nav::-webkit-scrollbar-thumb { background: #526176; border-radius: 6px; }
.main-nav button { border: 0; background: transparent; color: var(--sidebar-muted); min-height: 43px; border-radius: 6px; display: flex; align-items: center; gap: 12px; padding: 0 12px; font-weight: 600; text-align: left; }
.main-nav button:hover { background: rgba(255,255,255,.06); color: white; }
.main-nav button.active { background: #283445; color: white; }
.sidebar-footer { flex: 0 0 auto; margin-top: 12px; border-top: 1px solid rgba(255,255,255,.09); padding: 14px 8px 0; background: var(--sidebar); }
.user-summary { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; min-width: 0; }
.user-summary > span { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #37465b; font-size: 13px; font-weight: 700; }
.user-summary div { min-width: 0; }
.user-summary strong, .user-summary small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-summary strong { font-size: 13px; }
.user-summary small { color: var(--sidebar-muted); margin-top: 3px; }
.sidebar-app-version { display: block; margin: 0 4px 11px; color: #93a4ba; font-size: 10px; line-height: 1.3; white-space: nowrap; }
.main-content { min-width: 0; }
.topbar { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 28px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar h1 { margin: 0; font-size: 22px; line-height: 1.2; }
.topbar-actions { display: flex; gap: 10px; }
.notification-button { position: relative; border: 1px solid var(--line); background: var(--surface); }
.notification-button.has-overdue { border-color: #e9a3a7; background: var(--red-soft); color: var(--red); }
.notification-count { position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border-radius: 10px; background: var(--red); color: white; font-size: 10px; line-height: 1; }
.notification-list { display: grid; border-top: 1px solid var(--line); }
.notification-row { width: 100%; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 12px; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; }
.notification-row:hover { background: var(--surface-subtle); }
.notification-row > i { margin-top: 2px; color: var(--blue); }
.notification-row.high > i { color: var(--red); }
.notification-row strong, .notification-row small, .notification-row p { display: block; }
.notification-row small { margin-top: 4px; color: var(--muted); }
.notification-row p { margin: 7px 0 0; line-height: 1.55; }
.notification-row.read { opacity: .68; }
.overview-alert-strip { margin-top: 12px; border: 1px solid var(--line); background: var(--surface); }
.overview-alert-heading, .overview-alert-item { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 11px 14px; }
.overview-alert-heading { min-height: 54px; color: var(--ink); border-bottom: 1px solid var(--line); }
.overview-alert-heading > i { color: var(--blue); }
.overview-alert-heading strong, .overview-alert-heading small { display: block; }
.overview-alert-heading small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.overview-alert-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(205px,1fr)); gap: 1px; background: var(--line); }
.overview-alert-item { min-height: 66px; border: 0; background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
.overview-alert-item:hover { background: var(--surface-subtle); }
.overview-alert-item:disabled { cursor: default; opacity: 1; }
.overview-alert-item:disabled:hover { background: var(--surface); }
.overview-alert-item > i { color: var(--muted); }
.overview-alert-item > span { flex: 1; min-width: 0; font-size: 12px; font-weight: 700; }
.overview-alert-item > span b, .overview-alert-item > span small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overview-alert-item > span small { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 600; }
.overview-alert-item > strong { font-size: 20px; }
.overview-alert-item > small { color: var(--muted); font-size: 10px; white-space: nowrap; }
.overview-alert-item.danger { background: var(--red-soft); color: var(--red); }
.overview-alert-item.danger > i, .overview-alert-item.warning > i { color: currentColor; }
.overview-alert-item.warning { color: var(--amber); }
.overview-alert-empty { min-height: 66px; padding: 18px; display: flex; align-items: center; background: var(--surface); color: var(--muted); font-size: 11px; }
.mailbox-alert-section { margin: 14px 0; border: 1px solid var(--line); background: var(--surface); }
.mailbox-alert-header { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.mailbox-alert-header strong, .mailbox-alert-header small { display: block; }
.mailbox-alert-header small { margin-top: 3px; color: var(--muted); }
.mailbox-alert-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.mailbox-alert-list .email-alert-summary { margin: 0; border: 0; border-bottom: 1px solid var(--line); }
.mailbox-alert-list .email-alert-summary:nth-child(odd) { border-right: 1px solid var(--line); }
.email-alert-summary { width: 100%; min-height: 64px; margin: 14px 0; padding: 10px 14px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto 18px; align-items: center; gap: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
.email-alert-summary:hover { background: var(--surface-subtle); }
.email-alert-summary.warning { border-left: 3px solid var(--amber); }
.email-alert-summary.danger { border-left: 3px solid var(--red); background: #fffafa; }
.email-alert-summary-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 4px; background: var(--blue-soft); color: var(--blue); }
.email-alert-summary.danger .email-alert-summary-icon { background: var(--red-soft); color: var(--red); }
.email-alert-summary > span:nth-child(2) strong, .email-alert-summary > span:nth-child(2) small { display: block; }
.email-alert-summary > span:nth-child(2) small { margin-top: 3px; color: var(--muted); }
.email-alert-summary-counts { display: flex; align-items: stretch; border-left: 1px solid var(--line); }
.email-alert-summary-counts b { min-width: 70px; padding: 3px 12px; font-size: 18px; text-align: center; }
.email-alert-summary-counts small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 600; }
.email-alert-dialog-summary { display: flex; gap: 10px; margin-bottom: 10px; }
.email-alert-dialog-summary button { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--line); background: var(--surface-subtle); color: var(--ink); font-size: 11px; cursor: pointer; }
.email-alert-dialog-summary button:hover, .email-alert-dialog-summary button.active { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.email-alert-detail-list { display: grid; max-height: min(62vh,620px); overflow-y: auto; border-top: 1px solid var(--line); }
.email-alert-detail { width: 100%; min-height: 62px; display: grid; grid-template-columns: 82px minmax(0,1fr) 108px 18px; align-items: center; gap: 12px; padding: 10px 8px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.email-alert-detail:hover { background: var(--surface-subtle); }
.email-alert-detail.overdue { border-left: 3px solid var(--red); background: #fffafa; }
.email-alert-detail.unread > span:nth-child(2) strong { font-weight: 800; }
.email-alert-filter-actions { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 0; }
.email-alert-filter-actions .secondary-button.active { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); font-weight: 800; }
.email-alert-clear-actions { align-items: center; justify-content: space-between; gap: 10px; }
.email-alert-clear-actions .form-hint { margin: 0; }
.email-alert-status { display: flex; align-items: center; gap: 6px; color: var(--blue); font-size: 10px; }
.email-alert-detail.overdue .email-alert-status { color: var(--red); }
.email-alert-detail > span:nth-child(2) strong, .email-alert-detail > span:nth-child(2) small, .email-alert-wait strong, .email-alert-wait small { display: block; }
.email-alert-detail > span:nth-child(2) small, .email-alert-wait small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.email-alert-wait { text-align: right; }
.dialog-loading { min-height: 220px; display: grid; place-items: center; align-content: center; gap: 9px; color: var(--muted); text-align: center; }
.dialog-loading > i { color: var(--blue); animation: spin 1s linear infinite; }
.readonly-email-notice { display: flex; gap: 10px; padding: 11px 12px; border: 1px solid #b9d7c4; background: #f4fbf6; color: #27613b; }
.readonly-email-notice strong, .readonly-email-notice small { display: block; }
.readonly-email-notice small { margin-top: 3px; line-height: 1.45; }
.email-analysis-grid { margin: 14px 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border: 1px solid var(--line); }
.email-analysis-grid > div { min-width: 0; padding: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.email-analysis-grid > div:nth-child(even) { border-right: 0; }
.email-analysis-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
.email-analysis-grid span, .email-analysis-grid strong, .email-analysis-grid small { display: block; }
.email-analysis-grid span { color: var(--muted); font-size: 10px; }
.email-analysis-grid strong { margin-top: 5px; line-height: 1.55; }
.email-analysis-grid small { margin-top: 4px; color: var(--muted); }
.email-conversation { margin-top: 16px; }
.email-conversation > h3 { margin: 0 0 8px; font-size: 14px; }
.email-message { margin-bottom: 10px; padding: 13px; border: 1px solid var(--line); background: var(--surface); }
.email-message.outbound { margin-left: 34px; border-left: 3px solid var(--blue); background: #f8fbff; }
.email-message.inbound { margin-right: 34px; }
.email-message header { display: flex; justify-content: space-between; gap: 12px; }
.email-message header b, .email-message header small { display: block; }
.email-message header small { margin-top: 3px; color: var(--muted); }
.email-message h4 { margin: 11px 0 0; font-size: 12px; }
.email-message-content { margin-top: 10px; color: #374151; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.product-followup-link { margin: 12px 0; padding: 11px 12px; display: flex; gap: 10px; border: 1px solid #acd7bc; background: #f4fbf6; }
.product-followup-link.pending { border-color: #e2b15f; background: #fff9ee; }
.product-followup-link strong, .product-followup-link small { display: block; }
.product-followup-link small { margin-top: 4px; color: var(--muted); }
.product-improvement-list { display: grid; }
.product-improvement-row { min-width: 0; display: grid; grid-template-columns: 90px minmax(0,1fr) auto; gap: 14px; align-items: start; padding: 15px 18px; border-top: 1px solid var(--line); }
.product-improvement-row.pending { border-left: 4px solid var(--amber); background: #fffaf0; }
.product-improvement-state { display: flex; align-items: center; gap: 6px; color: var(--green); font-size: 10px; font-weight: 800; }
.product-improvement-row.pending .product-improvement-state { color: var(--amber); }
.product-improvement-row > div:nth-child(2) strong, .product-improvement-row > div:nth-child(2) small { display: block; }
.product-improvement-row > div:nth-child(2) small { margin-top: 4px; color: var(--muted); }
.product-improvement-row > div:nth-child(2) > p { margin: 9px 0 0; line-height: 1.55; }
.product-improvement-hierarchy, .sourcing-hierarchy { display: grid; gap: 10px; background: var(--surface-subtle); }
.product-improvement-store, .product-improvement-product, .sourcing-hierarchy-group { min-width: 0; border: 1px solid var(--line); background: var(--surface); }
.product-improvement-store > summary, .product-improvement-product > summary, .sourcing-hierarchy-group > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 13px; }
.product-improvement-store > summary::-webkit-details-marker, .product-improvement-product > summary::-webkit-details-marker, .sourcing-hierarchy-group > summary::-webkit-details-marker { display: none; }
.product-improvement-store > summary > span, .product-improvement-product > summary > span, .sourcing-hierarchy-group > summary > span { min-width: 0; display: grid; gap: 3px; }
.product-improvement-store > summary small, .product-improvement-product > summary small, .sourcing-hierarchy-group > summary small { color: var(--muted); font-size: 10px; font-weight: 500; }
.product-improvement-store > summary > i:last-child, .product-improvement-product > summary > i:last-child, .sourcing-hierarchy-group > summary > i:last-child { flex: none; color: var(--muted); }
.product-improvement-store > div { padding: 0 9px 9px; }
.product-improvement-product { margin-top: 8px; }
.product-improvement-product > summary { min-height: 42px; padding: 8px 11px; background: var(--surface-subtle); }
.sourcing-hierarchy-group > summary { min-height: 56px; }
.sourcing-hierarchy-group > summary > span { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; column-gap: 7px; }
.sourcing-hierarchy-group > summary > span > i { grid-row: 1 / span 2; color: var(--blue); }
.sourcing-hierarchy-group > summary > b { flex: none; color: var(--muted); font-size: 10px; }
.sourcing-hierarchy-group > .data-table-wrap { border-top: 1px solid var(--line); }
.shipping-quote-summary { min-width: 190px; display: grid; gap: 5px; }
.shipping-quote-line { display: grid; grid-template-columns: minmax(62px,auto) minmax(78px,auto); gap: 3px 7px; align-items: baseline; }
.shipping-quote-line strong { font-size: 11px; }
.shipping-quote-line span { text-align: right; font-weight: 700; white-space: nowrap; }
.shipping-quote-line small { grid-column: 1 / -1; color: var(--muted); font-size: 9px; line-height: 1.35; }
.shipping-quote-line.unavailable { color: var(--muted); }
.selection-rule-summary { margin-top: 5px; display: grid; gap: 3px; }
.selection-rule-summary small { color: var(--muted); line-height: 1.35; }
.inline-facts-shortcut { border: 0; background: transparent; color: var(--blue); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }
.sourcing-recommendation { display: grid; gap: 2px; margin-top: 5px; padding-top: 5px; border-top: 1px dashed var(--line); }
.sourcing-recommendation strong { color: var(--blue); font-size: 12px; }
.sourcing-recommendation.pending strong { color: var(--muted); }
.sourcing-recommendation small { color: var(--muted); line-height: 1.3; }
.sourcing-recommendation .positive-text { color: var(--success); }
.sourcing-progress { min-width: 130px; display: grid; gap: 4px; }
.sourcing-progress > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.sourcing-progress strong { color: var(--blue); font-size: 12px; }
.sourcing-progress small { color: var(--muted); font-size: 10px; }
.sourcing-progress .progress-track { margin: 0; height: 6px; }
.sourcing-progress.abandoned strong, .sourcing-progress.overdue strong { color: var(--danger); }
.sourcing-progress.abandoned .progress-track span, .sourcing-progress.overdue .progress-track span { background: var(--danger); }
.sourcing-stage-timing, .sourcing-stage-history { display: block; line-height: 1.4; }
.sourcing-stage-timing { color: var(--blue); font-weight: 700; }
.sourcing-stage-history { max-width: 260px; white-space: normal; }
.sourcing-stage-timing-panel { display: grid; gap: 5px; padding: 10px 12px; margin: 0 0 12px; border: 1px solid var(--line); background: var(--surface-subtle); }
.sourcing-stage-timing-panel > strong { color: var(--ink); }
.sourcing-stage-progress { min-width: 260px; display: grid; gap: 8px; padding: 8px 0; }
.sourcing-stage-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.sourcing-stage-progress-head strong { color: var(--ink); font-size: 12px; }
.sourcing-stage-progress-track { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; min-width: 300px; padding: 0 8px; }
.sourcing-stage-progress-track::before { content: ''; position: absolute; top: 12px; left: 8%; right: 8%; height: 3px; background: #e2e7ed; border-radius: 999px; }
.sourcing-stage-segment { position: relative; z-index: 1; min-width: 0; display: grid; justify-items: center; gap: 5px; padding: 0 3px; border: 0; background: transparent; text-align: center; }
.sourcing-stage-segment-head { display: grid; justify-items: center; gap: 4px; min-width: 0; }
.sourcing-stage-segment-head strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 700; }
.sourcing-stage-index { flex: none; display: inline-grid; place-items: center; width: 25px; height: 25px; border: 3px solid var(--surface); border-radius: 50%; background: #dfe5ec; color: var(--muted); box-shadow: 0 0 0 1px #dfe5ec; font-size: 10px; font-weight: 800; }
.sourcing-stage-segment-bar, .sourcing-stage-connector { display: none; }
.sourcing-stage-segment small { color: var(--muted); font-size: 9px; line-height: 1.2; white-space: nowrap; }
.sourcing-stage-segment.complete .sourcing-stage-index { background: var(--success); color: #fff; box-shadow: 0 0 0 1px var(--success); }
.sourcing-stage-segment.complete small { color: var(--success); font-weight: 700; }
.sourcing-stage-segment.current .sourcing-stage-index { background: var(--blue); color: #fff; box-shadow: 0 0 0 1px var(--blue); }
.sourcing-stage-segment.current small { color: var(--blue); font-weight: 700; }
.sourcing-stage-segment.pending { opacity: .68; }
.sourcing-stage-segment.pending .sourcing-stage-index { background: var(--surface); }
.sourcing-stage-progress.abandoned .sourcing-stage-segment.current, .sourcing-stage-progress.abandoned .sourcing-stage-segment.complete { border-color: rgba(177, 42, 42, .35); }
.sourcing-stage-progress.abandoned .sourcing-stage-segment.complete .sourcing-stage-segment-bar i { background: var(--danger); }
.sourcing-stage-plan { min-width: 280px; display: grid; gap: 5px; }
.sourcing-stage-plan-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sourcing-stage-plan-head strong { color: var(--ink); font-size: 12px; white-space: nowrap; }
.sourcing-stage-plan-head strong b { color: var(--blue); font-size: 16px; }
.sourcing-stage-plan-head span, .sourcing-stage-plan-foot { color: var(--muted); font-size: 10px; }
.sourcing-stage-plan .sourcing-stage-progress { min-width: 0; padding: 0; gap: 5px; }
.sourcing-stage-plan .sourcing-stage-progress-head { display: none; }
.sourcing-stage-plan .sourcing-stage-progress-track { gap: 0; }
.sourcing-stage-plan .sourcing-stage-segment { padding: 0 3px; }
.sourcing-stage-plan .sourcing-stage-segment-head strong { font-size: 10px; }
.sourcing-stage-plan .sourcing-stage-segment small { font-size: 9px; }
.sourcing-stage-plan-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sourcing-stage-plan.overdue .sourcing-stage-plan-head strong, .sourcing-stage-plan.overdue .sourcing-stage-plan-foot span { color: var(--danger); }
.sourcing-stage-plan.abandoned .sourcing-stage-plan-head strong { color: var(--danger); }
@media (max-width: 760px) {
  .sourcing-stage-progress { min-width: 220px; }
  .sourcing-stage-plan { min-width: 220px; }
  .sourcing-stage-progress-track { min-width: 290px; }
}
.new-presenter-assessment { display: block; color: #8d5200; font-weight: 700; }
.danger-outline { color: var(--danger) !important; border-color: rgba(177,42,42,.35) !important; }
.selection-rule-badge { display: inline-flex; width: fit-content; padding: 2px 6px; border-radius: 3px; font-size: 10px; font-weight: 800; }
.selection-rule-badge.ready { color: #17603a; background: #e8f6ed; }
.selection-rule-badge.review { color: #7a4b0b; background: #fff1d7; }
.selection-rule-badge.hold { color: #8a1c1c; background: #fdecec; }
.analysis-note.compact { margin-top: 9px; padding: 9px; }
.analysis-note.compact p { margin: 3px 0 0; }
.suggestion-summary-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; background: var(--surface-subtle); }
.suggestion-summary-company { min-width: 0; border: 1px solid var(--line); background: var(--surface); }
.suggestion-summary-company > header { min-height: 46px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.suggestion-summary-company > header > span { display: flex; align-items: center; gap: 7px; }
.suggestion-summary-company > header i { color: var(--blue); }
.suggestion-summary-company > header > span:last-child { color: var(--muted); font-size: 10px; }
.suggestion-summary-department { min-height: 45px; padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.suggestion-summary-department strong, .suggestion-summary-department small { display: block; }
.suggestion-summary-department small { margin-top: 3px; color: var(--muted); }
.suggestion-summary-department > span:last-child { flex: none; color: var(--muted); font-size: 10px; }
.suggestion-summary-priority { min-width: 0; max-width: 100%; padding: 9px 12px; display: grid; gap: 6px; background: #fff9ee; }
.suggestion-summary-priority span { min-width: 0; max-width: 100%; color: #7a4b0b; font-size: 10px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.suggestion-summary-priority b { margin-right: 5px; }
.suggestion-hierarchy { display: grid; gap: 12px; background: var(--surface-subtle); }
.suggestion-company, .suggestion-department, .suggestion-leader, .suggestion-employee { min-width: 0; border: 1px solid var(--line); background: var(--surface); }
.suggestion-company > summary, .suggestion-department > summary, .suggestion-leader > summary, .suggestion-employee > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.suggestion-company > summary::-webkit-details-marker, .suggestion-department > summary::-webkit-details-marker, .suggestion-leader > summary::-webkit-details-marker, .suggestion-employee > summary::-webkit-details-marker { display: none; }
.suggestion-company > summary { min-height: 52px; padding: 11px 14px; }
.suggestion-company > summary span, .suggestion-department > summary span, .suggestion-leader > summary span, .suggestion-employee > summary span { min-width: 0; display: flex; align-items: center; gap: 7px; }
.suggestion-company > summary small, .suggestion-department > summary small, .suggestion-leader > summary small, .suggestion-employee > summary small { color: var(--muted); font-size: 10px; }
.suggestion-company > summary > span:last-child { flex: none; font-size: 10px; }
.suggestion-company > div { padding: 0 10px 10px; }
.suggestion-department { margin-top: 10px; }
.suggestion-department > summary { min-height: 44px; padding: 9px 12px; background: var(--surface-subtle); }
.suggestion-department > div { padding: 0 9px 9px; }
.suggestion-leader { margin-top: 9px; }
.suggestion-leader > summary { min-height: 42px; padding: 8px 11px; background: var(--blue-soft); }
.suggestion-leader > div { padding: 0 8px 8px; }
.suggestion-employee { margin-top: 8px; }
.suggestion-employee > summary { min-height: 40px; padding: 8px 10px; }
.suggestion-employee > summary > span:last-child { flex: none; font-size: 10px; }
.suggestion-employee > .activity-list { border-top: 1px solid var(--line); }
.suggestion-item { padding: 14px; }
.employee-hierarchy { display: grid; gap: 14px; }
.organization-company { border: 1px solid var(--line); background: var(--surface); }
.organization-company > summary, .organization-department > summary { cursor: pointer; list-style: none; }
.organization-company > summary::-webkit-details-marker, .organization-department > summary::-webkit-details-marker { display: none; }
.organization-company > summary { min-height: 54px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.organization-company > summary span { display: flex; align-items: center; gap: 9px; }
.organization-company > summary i { color: var(--blue); }
.organization-company > summary b { color: var(--muted); font-size: 11px; }
.organization-departments { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 12px; background: var(--surface-subtle); }
.organization-department { min-width: 0; border: 1px solid var(--line); background: var(--surface); }
.organization-department > summary { min-height: 44px; padding: 10px 12px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.organization-department > summary span { display: flex; align-items: baseline; gap: 8px; }
.organization-department > summary small { color: var(--muted); }
.organization-team { margin: 10px; border: 1px solid var(--line); }
.organization-team > header { min-height: 40px; padding: 9px 11px; display: flex; align-items: center; background: var(--surface-subtle); border-bottom: 1px solid var(--line); }
.organization-team > header span { display: flex; align-items: center; gap: 7px; }
.organization-team > header small { color: var(--muted); }
.organization-team.management-team > header { background: var(--blue-soft); color: var(--blue); }
.organization-team.unassigned-team > header { background: #fff9ee; color: #8b5a11; }
.organization-person { min-width: 0; display: grid; grid-template-columns: 36px minmax(0,1fr) minmax(150px,.7fr) auto; gap: 10px; align-items: center; padding: 10px 11px; border-bottom: 1px solid var(--line); cursor: pointer; }
.organization-person:last-child { border-bottom: 0; }
.organization-person:hover { background: var(--surface-subtle); }
.organization-person.role-department_leader { border-left: 3px solid var(--blue); }
.organization-person-main { min-width: 0; }
.organization-person-main strong, .organization-person-main small { display: block; }
.organization-person-main small { margin: 3px 0 5px; color: var(--muted); }
.organization-person-meta { min-width: 0; text-align: right; color: var(--muted); font-size: 10px; }
.organization-person-meta span, .organization-person-meta small { display: block; overflow-wrap: anywhere; }
.organization-person-meta small { margin-top: 4px; }
.organization-overview { margin-top: 16px; }
.organization-overview-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 14px; background: var(--surface-subtle); }
.organization-overview-company { min-width: 0; padding: 14px; border: 1px solid var(--line); background: var(--surface); }
.organization-overview-company > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.organization-overview-company > header span { display: flex; align-items: center; gap: 8px; }
.organization-overview-company > header i { color: var(--blue); }
.organization-overview-company > header b { font-size: 18px; }
.organization-overview-metrics { margin: 12px 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid var(--line); }
.organization-overview-metrics span { padding: 8px; border-right: 1px solid var(--line); color: var(--muted); font-size: 10px; text-align: center; }
.organization-overview-metrics span:last-child { border-right: 0; }
.organization-overview-metrics b { display: block; margin-top: 3px; color: var(--ink); font-size: 15px; }
.organization-overview-departments { display: grid; }
.organization-overview-departments > div { padding: 8px 0; border-top: 1px solid var(--line); }
.organization-overview-departments strong, .organization-overview-departments small { display: block; }
.organization-overview-departments small { margin-top: 3px; color: var(--muted); line-height: 1.5; }
.organization-overview-company > .ghost-button { margin-top: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.view-root { padding: 24px 28px 48px; max-width: 1640px; margin: 0 auto; }
.mobile-only { display: none; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--surface); }
.metric { padding: 20px 22px; min-height: 118px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.metric strong { display: block; margin-top: 15px; font-size: 32px; line-height: 1; }
.metric small { display: block; margin-top: 10px; color: var(--muted); }
.metric.danger strong, .danger-text { color: var(--red); }
.finance-missing-salary td { background: color-mix(in srgb, var(--red) 4%, var(--surface)); }
.finance-missing-salary .danger-text { font-weight: 700; }

.dashboard-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .75fr); gap: 20px; margin-top: 20px; align-items: start; }
.section { background: var(--surface); border: 1px solid var(--line); }
.section + .section { margin-top: 20px; }
.section-header { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.section-header h2, .section-header h3 { margin: 0; font-size: 15px; }
.section-header p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.section-body { padding: 18px; }
.risk-list, .activity-list, .company-list, .people-list { display: grid; }
.risk-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 15px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.risk-row:last-child { border-bottom: 0; }
.risk-row:hover { background: var(--surface-subtle); }
.risk-title { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 14px; }
.risk-title i { color: var(--red); }
.risk-meta, .table-meta { margin-top: 7px; display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.risk-tags { display: flex; align-items: flex-start; justify-content: flex-end; gap: 6px; flex-wrap: wrap; max-width: 220px; }
.status-tag, .risk-tag, .priority-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.risk-tag.high, .status-blocked { color: var(--red); background: var(--red-soft); }
.risk-tag.medium, .priority-high, .priority-urgent { color: var(--amber); background: var(--amber-soft); }
.status-in_progress { color: var(--blue); background: var(--blue-soft); }
.status-review { color: var(--purple); background: var(--purple-soft); }
.status-completed { color: var(--green); background: var(--green-soft); }
.status-active { color: var(--green); background: var(--green-soft); }
.status-paused { color: var(--amber); background: var(--amber-soft); }
.status-planned { color: var(--blue); background: var(--blue-soft); }
.status-todo, .status-cancelled, .priority-low, .priority-medium { color: #566273; background: #edf0f3; }
.progress-track { height: 6px; background: #e9edf1; overflow: hidden; margin-top: 9px; }
.progress-track span { display: block; height: 100%; background: var(--blue); }

.status-chart { display: grid; gap: 14px; }
.status-bar { display: grid; grid-template-columns: 58px minmax(0, 1fr) 25px; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.status-bar-track { height: 8px; background: #edf0f2; }
.status-bar-track span { display: block; height: 100%; background: var(--blue); }
.status-bar:nth-child(3) .status-bar-track span { background: var(--red); }
.status-bar:nth-child(4) .status-bar-track span { background: var(--purple); }
.status-bar:nth-child(5) .status-bar-track span { background: var(--green); }
.status-bar strong { color: var(--ink); text-align: right; }
.person-row, .company-row, .activity-row { padding: 13px 0; border-bottom: 1px solid var(--line); }
.person-row:first-child, .company-row:first-child, .activity-row:first-child { padding-top: 0; }
.person-row:last-child, .company-row:last-child, .activity-row:last-child { padding-bottom: 0; border-bottom: 0; }
.person-row { display: flex; align-items: center; gap: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-subtle); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--muted); flex: none; }
.person-row div, .activity-row div { min-width: 0; }
.person-row strong, .person-row small, .activity-row strong, .activity-row small { display: block; }
.person-row small, .activity-row small { color: var(--muted); font-size: 11px; margin-top: 3px; }
.company-row-top { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.company-row-top strong { max-width: 75%; }
.company-row-top span { color: var(--muted); }
.activity-row strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-row p { margin: 6px 0 0; color: #4c5664; font-size: 12px; line-height: 1.55; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.filters { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.search-field { position: relative; min-width: min(310px, 80vw); }
.search-field i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-field input { margin: 0; padding-left: 37px; }
.toolbar select { width: auto; min-width: 130px; margin: 0; }
.toolbar-summary { color: var(--muted); font-size: 12px; }

.data-table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); }
.data-table { width: 100%; border-collapse: collapse; min-width: 850px; }
.data-table th { text-align: left; color: var(--muted); font-size: 11px; font-weight: 700; background: var(--surface-subtle); border-bottom: 1px solid var(--line); padding: 11px 14px; white-space: nowrap; }
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: 12px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafbfc; }
.data-table tbody tr[data-id] { cursor: pointer; }
.table-title { font-size: 13px; font-weight: 700; max-width: 360px; }
.table-title small { display: block; color: var(--muted); margin-top: 5px; font-weight: 500; }
.mail-category-summary { padding: 12px 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; background: var(--surface-subtle); }
.mail-category-chip { min-height: 34px; padding: 7px 10px; border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.mail-category-chip strong { color: var(--ink); font-size: 14px; }
.mail-category-chip.category-customer { border-left: 3px solid var(--green); }
.mail-category-chip.category-creator_collaboration { border-left: 3px solid var(--blue); }
.mail-category-chip.category-advertising { border-left: 3px solid var(--amber); }
.mail-category-chip.category-spam { border-left: 3px solid var(--red); }
.mail-category-chip.category-unknown { border-left: 3px solid var(--muted); }
.customer-hierarchy { display: grid; background: var(--surface-subtle); }
.customer-mailbox-group, .customer-category-group { min-width: 0; background: var(--surface); }
.customer-mailbox-group + .customer-mailbox-group { border-top: 1px solid var(--line); }
.customer-mailbox-group > summary, .customer-category-group > summary { list-style: none; cursor: pointer; }
.customer-mailbox-group > summary::-webkit-details-marker, .customer-category-group > summary::-webkit-details-marker { display: none; }
.customer-mailbox-group > summary { min-height: 76px; padding: 14px 18px; display: grid; grid-template-columns: 38px minmax(190px,1fr) auto 18px; gap: 12px; align-items: center; }
.customer-mailbox-group > summary:hover, .customer-category-group > summary:hover { background: var(--surface-subtle); }
.customer-mailbox-icon, .customer-category-icon { display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); }
.customer-mailbox-icon { width: 34px; height: 34px; }
.customer-category-icon { width: 30px; height: 30px; }
.customer-mailbox-name, .customer-mailbox-name strong, .customer-mailbox-name small { min-width: 0; display: block; overflow-wrap: anywhere; }
.customer-mailbox-name small, .customer-category-group > summary span small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.customer-mailbox-counts { display: grid; grid-template-columns: repeat(3,64px); border: 1px solid var(--line); }
.customer-mailbox-counts b { padding: 7px 8px; border-right: 1px solid var(--line); text-align: center; font-size: 13px; }
.customer-mailbox-counts b:last-child { border-right: 0; }
.customer-mailbox-counts small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 500; }
.customer-mailbox-group > summary > i, .customer-category-group > summary > i { width: 16px; height: 16px; color: var(--muted); transition: transform .16s ease; }
.customer-mailbox-group[open] > summary > i, .customer-category-group[open] > summary > i { transform: rotate(90deg); }
.customer-mailbox-group[open] > summary { border-bottom: 1px solid var(--line); }
.mailbox-classification-panel { background: var(--surface-subtle); }
.mailbox-category-toolbar { padding: 12px 18px 0 70px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; }
.mailbox-category-toolbar .mail-category-summary { padding: 0; border: 0; background: transparent; }
.email-ai-status { min-height: 28px; margin: 8px 18px 0 70px; padding: 6px 9px; border-left: 3px solid var(--blue); background: var(--surface); color: var(--muted); display: flex; align-items: center; gap: 7px; font-size: 10px; }
.email-ai-status i { width: 14px; height: 14px; color: var(--blue); flex: 0 0 auto; }
.customer-category-list { padding: 10px 18px 18px 70px; display: grid; gap: 8px; background: var(--surface-subtle); }
.customer-category-group { border: 1px solid var(--line); }
.customer-category-group > summary { min-height: 58px; padding: 10px 14px; display: grid; grid-template-columns: 30px minmax(0,1fr) auto 16px; gap: 10px; align-items: center; }
.customer-category-group > summary span:nth-child(2) strong, .customer-category-group > summary span:nth-child(2) small { display: block; }
.customer-category-group > summary > b { min-width: 30px; padding: 4px 7px; border-radius: 4px; background: var(--surface-subtle); text-align: center; font-size: 11px; }
.customer-category-group[open] > summary { border-bottom: 1px solid var(--line); }
.customer-profile-list { display: grid; }
.customer-profile-row { width: 100%; min-width: 0; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; grid-template-columns: minmax(150px,.75fr) minmax(240px,1.5fr) minmax(150px,.8fr) 105px 16px; gap: 14px; align-items: center; text-align: left; cursor: pointer; }
.customer-profile-row:last-child { border-bottom: 0; }
.customer-profile-row:hover { background: #fafbfc; }
.customer-profile-row:disabled { cursor: default; opacity: .72; }
.customer-profile-row > span, .customer-profile-row strong, .customer-profile-row small { min-width: 0; display: block; overflow-wrap: anywhere; }
.customer-profile-row small { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 500; }
.customer-profile-intent strong { font-weight: 500; line-height: 1.45; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.customer-profile-next strong { margin-top: 4px; font-size: 11px; line-height: 1.4; }
.customer-profile-activity { text-align: right; }
.customer-profile-row > i { width: 16px; height: 16px; color: var(--muted); }
.warning-text { color: var(--amber); }
.cell-progress { display: grid; grid-template-columns: minmax(70px, 1fr) 35px; align-items: center; gap: 8px; min-width: 125px; }
.cell-progress .progress-track { margin: 0; }
.cell-progress span:last-child { color: var(--muted); }
.empty-state { text-align: center; padding: 54px 20px; color: var(--muted); }
.empty-state i { width: 38px; height: 38px; margin: 0 auto 14px; color: #a9b1bb; }
.empty-state strong { display: block; color: var(--ink); margin-bottom: 6px; }

.update-stream { display: grid; gap: 12px; }
.update-card { background: var(--surface); border: 1px solid var(--line); padding: 18px; display: grid; grid-template-columns: 135px minmax(0, 1fr) 130px; gap: 20px; }
.update-date { font-size: 13px; font-weight: 700; }
.update-date small { display: block; color: var(--muted); margin-top: 6px; font-weight: 500; }
.update-main h3 { margin: 0 0 8px; font-size: 14px; }
.update-main p { margin: 0; color: #4c5664; font-size: 12px; line-height: 1.7; white-space: pre-wrap; }
.update-main .blocker { margin-top: 12px; color: var(--red); }
.update-progress { text-align: right; }
.update-progress strong { display: block; font-size: 22px; }
.update-progress button { margin-top: 14px; }
.report-record-actions { display: flex; justify-content: flex-end; gap: 6px; }
.report-record-actions .danger-text { color: var(--red); }

.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.project-card { background: var(--surface); border: 1px solid var(--line); padding: 18px; cursor: pointer; min-height: 180px; display: flex; flex-direction: column; }
.project-card:hover { border-color: #aeb8c5; }
.project-card-top { display: flex; justify-content: space-between; gap: 12px; }
.project-card-status { display: inline-flex; align-items: center; gap: 8px; }
.project-card-status .icon-button { width: 32px; min-height: 32px; padding: 0; }
.project-code { color: var(--blue); font-size: 11px; font-weight: 700; }
.project-card h3 { margin: 14px 0 8px; font-size: 15px; }
.project-card p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.project-card-footer { margin-top: auto; padding-top: 20px; }
.project-card-footer .table-meta { justify-content: space-between; }

.dialog-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(20, 28, 38, .52); display: grid; justify-items: end; }
.dialog { width: min(960px, calc(100vw - 24px)); height: 100vh; overflow-y: auto; background: var(--surface); box-shadow: var(--shadow); }
.dialog:has(#sourcing-form),
.dialog:has(#inventory-item-form) { width: min(1600px, calc(100vw - 24px)); max-width: none; }
.dialog:has(#sourcing-form) .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dialog:has(#sourcing-form) .form-grid .full { grid-column: 1 / -1; }
.dialog:has(#inventory-item-form) { width:min(1100px,calc(100vw - 24px)); }
.dialog:has(#inventory-item-form) #dialog-body { padding:14px 18px; }
.inventory-product-form { grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px 12px; }
.inventory-product-form > label { gap:4px; }
.inventory-product-form .inventory-auto-intake { padding:10px; }
.inventory-product-form .upload-box { padding:10px; }
.inventory-product-form .analysis-note { margin-top:8px; padding:8px 10px; }
.inventory-product-form .inventory-spec-editor-row { gap:8px; padding:10px; margin-bottom:10px; }
.inventory-product-form .inventory-spec-group { padding:9px; }
.inventory-product-form .inventory-spec-group h4 { margin-bottom:6px; }
.inventory-product-form .inventory-spec-group-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px 10px; }
.inventory-product-form .inventory-spec-group-cost .inventory-spec-group-grid,
.inventory-product-form .inventory-spec-group-package .inventory-spec-group-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.inventory-product-form .inventory-spec-field { gap:4px; }
.inventory-product-form .inventory-spec-field input { min-height:36px; }
.inventory-product-form .inventory-spec-editor-head { gap:6px; margin-bottom:8px; }
.inventory-product-form .form-actions { padding-top:12px; margin-top:0; }
@media(max-width:760px){.inventory-product-form{grid-template-columns:repeat(2,minmax(0,1fr));}.inventory-product-form .inventory-spec-group-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.inventory-product-form .inventory-spec-group-cost .inventory-spec-group-grid,.inventory-product-form .inventory-spec-group-package .inventory-spec-group-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:480px){.inventory-product-form{grid-template-columns:1fr;}.inventory-product-form .inventory-spec-group-grid,.inventory-product-form .inventory-spec-group-cost .inventory-spec-group-grid,.inventory-product-form .inventory-spec-group-package .inventory-spec-group-grid{grid-template-columns:1fr;}}
.dialog > header { min-height: 76px; position: sticky; top: 0; z-index: 2; background: var(--surface); border-bottom: 1px solid var(--line); padding: 16px 20px 16px 24px; display: flex; align-items: center; justify-content: space-between; }
.dialog h2 { margin: 0; font-size: 20px; }
#dialog-body { padding: 24px; }
.required-notification-backdrop { position: fixed; inset: 0; z-index: 320; display: grid; place-items: center; padding: 20px; background: rgba(10,17,27,.72); }
.required-notification { width: min(620px,100%); max-height: calc(100vh - 40px); overflow: auto; border: 1px solid #91afe0; border-top: 5px solid var(--blue); border-radius: 6px; background: var(--surface); box-shadow: 0 24px 70px rgba(8,18,34,.32); }
.required-notification > header { min-height: 76px; padding: 16px 18px 14px 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); background: #f5f9ff; }
.required-notification > header > div { min-width: 0; }
.required-notification h2 { margin: 3px 0 0; font-size: 21px; line-height: 1.35; overflow-wrap: anywhere; }
.required-notification > header .icon-button { flex: 0 0 auto; border-color: #9bb7df; background: var(--surface); }
.required-notification-body { padding: 22px; }
.required-notification-status { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 11px 12px; border-left: 4px solid var(--blue); background: var(--blue-soft); }
.required-notification-status > i { width: 20px; height: 20px; color: var(--blue); }
.required-notification-status strong, .required-notification-status small { display: block; }
.required-notification-status small { margin-top: 3px; color: var(--muted); }
.required-notification-body > p { margin: 0; color: var(--ink); font-size: 16px; font-weight: 650; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.required-notification-time { display: block; margin-top: 18px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); }
.required-notification-close-busy { opacity: .65; pointer-events: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 6px; }
.check-line { display: flex !important; align-items: flex-start; gap: 10px; }
.check-line input[type="checkbox"] { width: 18px !important; height: 18px; min-height: 18px; margin: 1px 0 0; flex: 0 0 18px; accent-color: var(--blue); }
.check-line > span, .check-line > span > strong, .check-line > span > small { min-width: 0; display: block; }
.check-line > span > small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.form-hint { margin: 6px 0 0; color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.55; }
@media (max-width: 900px) {
  .dialog:has(#sourcing-form),
  .dialog:has(#inventory-item-form) { width: calc(100vw - 12px); }
  .dialog:has(#sourcing-form) .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .dialog:has(#sourcing-form) .form-grid { grid-template-columns: 1fr; }
  .dialog:has(#sourcing-form) .form-grid > * { grid-column: 1; }
}
.detail-header { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.detail-number { color: var(--blue); font-size: 11px; font-weight: 700; }
.detail-header h3 { margin: 10px 0; font-size: 20px; line-height: 1.45; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 9px; }
.detail-section { padding: 20px 0; border-bottom: 1px solid var(--line); }
.detail-section h4 { margin: 0 0 12px; font-size: 13px; }
.detail-section p { color: #4c5664; font-size: 12px; line-height: 1.75; white-space: pre-wrap; }
.definition-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px 20px; }
.definition-grid div span, .definition-grid div strong { display: block; }
.definition-grid div span { color: var(--muted); font-size: 11px; }
.definition-grid div strong { margin-top: 5px; font-size: 12px; }
.timeline { display: grid; }
.timeline-item { position: relative; padding: 0 0 18px 22px; border-left: 1px solid var(--line); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; width: 7px; height: 7px; background: var(--blue); border-radius: 50%; left: -4px; top: 4px; }
.timeline-item strong { font-size: 12px; }
.timeline-item p { margin: 5px 0 0; }
.file-list { display: grid; }
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.file-row:last-child { border-bottom: 0; }
.file-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.file-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.upload-box { border: 1px dashed #b6bfca; padding: 16px; background: var(--surface-subtle); margin-top: 14px; }
.upload-box input { margin: 0; background: var(--surface); }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 200; max-width: min(390px, calc(100vw - 44px)); background: var(--ink); color: white; padding: 12px 16px; border-radius: 6px; box-shadow: var(--shadow); font-size: 13px; }
.version-update-banner { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 260; width: min(560px, calc(100vw - 32px)); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid #8cb4ec; border-radius: 6px; background: #f1f7ff; color: var(--ink); box-shadow: var(--shadow); }
.version-update-banner.hidden { display: none; }
.version-update-banner span { min-width: 0; display: grid; gap: 2px; }
.version-update-banner strong { font-size: 14px; }
.version-update-banner small { color: var(--muted); line-height: 1.4; }
.version-update-banner button { flex: 0 0 auto; }

@media (max-width: 700px) {
  .required-notification-backdrop { padding: 12px; }
  .required-notification { max-height: calc(100vh - 24px); }
  .required-notification > header { min-height: 68px; padding: 13px 12px 12px 16px; }
  .required-notification h2 { font-size: 18px; }
  .required-notification-body { padding: 17px 16px 19px; }
  .required-notification-body > p { font-size: 14px; line-height: 1.72; }
}

/* v2: monitoring, role-based overview and logistics */
.main-nav button { position: relative; }
.nav-alert { margin-left: auto; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; border-radius: 10px; background: #d14444; color: white; font-size: 10px; }
.view-intro { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 16px; }
.view-intro h2 { margin: 0; font-size: 18px; }
.view-intro p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.today-chip { border: 1px solid var(--line); background: var(--surface); padding: 8px 10px; border-radius: 5px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.livestream-intro-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.livestream-mirror-download { min-width: 246px; min-height: 52px; padding: 8px 14px; border: 1px solid #b9d8d1; border-radius: 8px; background: #edf7f4; color: #173f39; display: flex; align-items: center; gap: 10px; text-decoration: none; box-shadow: 0 1px 2px rgba(15,58,52,.06); transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.livestream-mirror-download:hover { border-color: #4d9388; background: #e2f2ee; transform: translateY(-1px); }
.livestream-mirror-download:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.livestream-mirror-download svg { width: 20px; height: 20px; flex: 0 0 auto; }
.livestream-mirror-download span, .livestream-mirror-download strong, .livestream-mirror-download small { display: block; }
.livestream-mirror-download strong { font-size: 13px; line-height: 1.35; }
.livestream-mirror-download small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.3; }
.overview-people { margin-top: 20px; }
.borderless { border: 0; }
.data-table.compact td { padding-top: 10px; padding-bottom: 10px; }
.data-table.wide { min-width: 1500px; }
.cell-sub { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 500; }
.person-cell { display: flex; align-items: center; gap: 9px; min-width: 110px; }
.person-cell > div { min-width: 0; }
.person-cell strong, .person-cell small { display: block; }
.person-cell small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.link-button { border: 0; background: transparent; padding: 0; color: var(--blue); font-weight: 700; }
.alert-count { display: inline-grid; place-items: center; min-width: 25px; height: 25px; padding: 0 6px; border-radius: 4px; background: var(--red-soft); color: var(--red); font-weight: 800; }
.change-feed { display: grid; }
.change-row { min-height: 58px; padding: 11px 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 44px minmax(150px, .8fr) minmax(260px, 1.4fr); align-items: center; gap: 12px; }
.change-row:last-child { border-bottom: 0; }
.object-type { width: 38px; min-height: 24px; display: grid; place-items: center; background: var(--surface-subtle); color: var(--muted); border-radius: 4px; font-size: 10px; font-weight: 700; }
.change-row strong, .change-row small { display: block; }
.change-row small { color: var(--muted); margin-top: 3px; font-size: 10px; }
.change-values { display: flex; flex-wrap: wrap; gap: 5px 10px; justify-content: flex-end; font-size: 11px; }
.delta { display: inline-block; font-weight: 700; margin-left: 3px; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.delta.muted { color: var(--muted); font-weight: 500; }
.alert-list { display: grid; }
.alert-row { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 13px 16px; display: flex; align-items: center; gap: 10px; text-align: left; }
.alert-row:last-child { border-bottom: 0; }
.alert-row:hover { background: var(--surface-subtle); }
.alert-row > i { color: var(--red); }
.alert-row strong, .alert-row small { display: block; }
.alert-row small { color: var(--muted); margin-top: 4px; }
.compact-metrics { margin-bottom: 18px; }
.monitor-actions { min-height: 56px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.monitor-hierarchy-section { overflow: hidden; }
.monitor-hierarchy { display: grid; gap: 12px; padding: 12px 16px 18px; background: var(--surface-subtle); }
.monitor-owner-group, .monitor-platform-group, .monitor-store-group { border: 1px solid var(--line); background: var(--surface); }
.monitor-owner-group > summary, .monitor-platform-group > summary, .monitor-store-group > summary { min-height: 52px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.monitor-owner-group > summary::-webkit-details-marker, .monitor-platform-group > summary::-webkit-details-marker, .monitor-store-group > summary::-webkit-details-marker { display: none; }
.monitor-owner-group > summary > span:first-child, .monitor-platform-group > summary > span:first-child, .monitor-store-group > summary > span:first-child { min-width: 0; display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: center; column-gap: 8px; }
.monitor-owner-group > summary strong, .monitor-platform-group > summary strong, .monitor-store-group > summary strong { min-width: 0; overflow-wrap: anywhere; }
.monitor-owner-group > summary small, .monitor-platform-group > summary small, .monitor-store-group > summary small { grid-column: 2; margin-top: 2px; color: var(--muted); font-size: 10px; }
.monitor-owner-group > summary > i:last-child, .monitor-platform-group > summary > i:last-child, .monitor-store-group > summary > span:last-child > i:last-child, .monitor-level-summary > i:last-child { flex: 0 0 auto; transition: transform .18s ease; }
.monitor-owner-group[open] > summary > i:last-child, .monitor-platform-group[open] > summary > i:last-child, .monitor-store-group[open] > summary > span:last-child > i:last-child, .monitor-platform-group[open] > summary .monitor-level-summary > i:last-child { transform: rotate(90deg); }
.monitor-owner-group > summary { border-left: 3px solid var(--blue); }
.comparison-owner-group > summary, .comparison-platform-group > summary, .comparison-store-group > summary { background: var(--surface-subtle); }
.comparison-group-actions { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.comparison-group-actions .small { white-space: nowrap; }
.comparison-hierarchy { display: grid; gap: 10px; }
.comparison-owner-group, .comparison-platform-group, .comparison-store-group { overflow: hidden; }
.comparison-owner-group[open] > summary, .comparison-platform-group[open] > summary, .comparison-store-group[open] > summary { border-bottom: 1px solid var(--line); }
.monitor-platform-list, .monitor-store-list { display: grid; gap: 8px; padding: 0 12px 12px 26px; }
.monitor-platform-group > summary { background: #fbfcfd; }
.account-scope-result-wrap:empty { display: none; }
.account-scope-action-bar { display: flex; justify-content: flex-end; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--surface-subtle); }
.account-scope-actions { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.account-scope-result-wrap.result-focus { outline: 3px solid rgba(33,102,209,.32); outline-offset: -3px; }
.account-scope-result { display: grid; grid-template-columns: minmax(150px,1.35fr) repeat(5,minmax(105px,1fr)); gap: 0; align-items: stretch; border-top: 1px solid var(--line); border-left: 3px solid var(--blue); background: #f7faff; }
.account-scope-result.success { border-left-color: var(--green); background: var(--green-soft); }
.account-scope-result.warning { border-left-color: var(--amber); background: var(--amber-soft); }
.account-scope-result > div, .account-scope-result > span { min-width: 0; padding: 9px 11px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.account-scope-result > div strong, .account-scope-result > span b { overflow-wrap: anywhere; }
.account-scope-result small { color: var(--muted); font-size: 10px; }
.account-scope-result > p { grid-column: 1 / -1; margin: 0; padding: 7px 11px; color: var(--muted); font-size: 10px; border-top: 1px solid var(--line); }
.monitor-store-list { padding-left: 24px; }
.monitor-store-group > summary { min-height: 46px; }
.monitor-store-group > summary > span:last-child { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.store-profile-section { overflow: hidden; }
.store-profile-hierarchy { display: grid; gap: 10px; padding: 12px 16px 18px; background: var(--surface-subtle); }
.store-platform-group, .store-owner-group { overflow: hidden; }
.store-platform-group[open] > summary, .store-owner-group[open] > summary { border-bottom: 1px solid var(--line); }
.store-owner-group > summary { border-left: 3px solid var(--blue); background: var(--surface); }
.store-profile-list { display: grid; gap: 1px; background: var(--line); }
.store-profile-card { min-height: 82px; padding: 12px 14px; display: grid; grid-template-columns: minmax(220px,1.5fr) minmax(260px,1fr) auto; align-items: center; gap: 14px; background: var(--surface); }
.store-profile-main { min-width: 0; display: grid; gap: 4px; }
.store-profile-main strong { overflow-wrap: anywhere; }
.store-profile-main small, .store-profile-main span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.store-profile-metrics { min-width: 0; display: grid; grid-template-columns: repeat(3,minmax(72px,1fr)); align-items: center; gap: 8px; }
.store-profile-metrics > span { min-width: 0; min-height: 46px; padding: 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; border: 1px solid var(--line); background: var(--surface-subtle); color: var(--muted); font-size: 10px; }
.store-profile-metrics b { color: var(--ink); font-size: 16px; }
.store-profile-metrics small { width: 100%; color: var(--muted); }
.monitor-level-summary { display: flex; align-items: center; justify-content: flex-end; gap: 5px; flex-wrap: wrap; }
.monitor-level-summary > span { padding: 3px 6px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 10px; white-space: nowrap; }
.monitor-level-summary b { color: var(--ink); }
.monitor-owner-summary-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.owner-account-batch-button { flex: 0 0 auto; min-height: 32px; white-space: nowrap; }
.owner-account-batch-button.analysis-running i { animation: spin .9s linear infinite; }
.social-period-toolbar { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); background: var(--surface-subtle); }
.social-period-toolbar p { margin: 0; max-width: 760px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.social-level-metrics { max-width: 720px; }
.social-level-metrics > span { display: inline-flex; align-items: baseline; gap: 3px; }
.social-level-metrics > span b { font-size: 11px; }
.monitor-leaf-list { border-top: 1px solid var(--line); }
.monitor-leaf-row { min-height: 104px; padding: 12px 14px; display: grid; grid-template-columns: minmax(170px,.9fr) minmax(300px,1.25fr) minmax(220px,1fr) auto; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); }
.monitor-leaf-row:last-child { border-bottom: 0; }
.monitor-leaf-row.risk { border-left: 3px solid var(--red); background: #fffafa; }
.monitor-leaf-title, .monitor-leaf-analysis { min-width: 0; }
.monitor-leaf-title > strong, .monitor-leaf-title > small, .monitor-leaf-analysis > strong { display: block; overflow-wrap: anywhere; }
.monitor-leaf-title > small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.monitor-leaf-tags { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 4px; }
.monitor-leaf-tags > span { padding: 3px 6px; border: 1px solid var(--line); background: var(--surface-subtle); color: var(--muted); font-size: 9px; }
.monitor-leaf-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 12px; }
.monitor-leaf-metrics span { min-width: 0; }
.monitor-leaf-metrics small, .monitor-leaf-metrics b { display: block; overflow-wrap: anywhere; }
.monitor-leaf-metrics small { color: var(--muted); font-size: 9px; }
.monitor-leaf-metrics b { margin-top: 2px; font-size: 11px; }
.monitor-leaf-analysis p { margin: 4px 0 0; color: #4c5664; font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.monitor-leaf-analysis > small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.monitor-leaf-analysis.analysis-run-error { padding-left: 9px; border-left: 3px solid var(--red); }
.analysis-running i { animation: analysis-spin 1.1s linear infinite; }
.sourcing-analysis-error { color: var(--danger) !important; max-width: 280px; white-space: normal; }
@keyframes analysis-spin { to { transform: rotate(360deg); } }
.monitor-leaf-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; flex-wrap: wrap; }
.social-detail-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid var(--line); margin-bottom: 14px; }
.social-detail-metrics > div { min-width: 0; padding: 14px; border-right: 1px solid var(--line); }
.social-detail-metrics > div:last-child { border-right: 0; }
.social-detail-metrics small, .social-detail-metrics strong, .social-detail-metrics span { display: block; overflow-wrap: anywhere; }
.social-detail-metrics small, .social-detail-metrics span { color: var(--muted); font-size: 10px; }
.social-detail-metrics strong { margin: 5px 0; font-size: 20px; }
.social-detail-toolbar { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; }
.social-post-table { min-width: 920px; }
.social-comment-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid var(--line); margin-bottom: 12px; }
.social-comment-summary span { padding: 11px; border-right: 1px solid var(--line); text-align: center; font-weight: 700; }
.social-comment-summary span:last-child { border-right: 0; }
.social-comment-list { display: grid; max-height: 54vh; overflow: auto; border: 1px solid var(--line); }
.social-comment-row { min-height: 64px; padding: 11px 13px; display: grid; grid-template-columns: minmax(120px,.35fr) minmax(260px,1fr) minmax(100px,.25fr); gap: 12px; align-items: start; border-bottom: 1px solid var(--line); }
.social-comment-row:last-child { border-bottom: 0; }
.social-comment-row p { margin: 0; line-height: 1.55; }
.social-comment-row small { display: block; margin-top: 3px; color: var(--muted); }
.social-platform-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.connection-section + .connection-section { margin-top: 18px; }
.segmented { display: inline-flex; align-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; overflow-x: auto; max-width: 100%; }
.segmented button { min-height: 38px; padding: 0 14px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.segmented button:last-child { border-right: 0; }
.segmented button.active { background: var(--ink); color: white; }
.connection-tag { display: inline-flex; min-height: 24px; align-items: center; border-radius: 4px; padding: 2px 8px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.connection-connected { color: var(--green); background: var(--green-soft); }
.connection-error { color: var(--red); background: var(--red-soft); }
.connection-pending { color: var(--amber); background: var(--amber-soft); }
.connection-not_connected { color: var(--muted); background: #edf0f3; }
.wrap-cell { min-width: 180px; max-width: 340px; line-height: 1.6; white-space: normal; }
.inline-note { margin: 0; color: var(--muted); font-size: 12px; }
.alert-band { margin: 18px 0; }
.alert-table { display: grid; }
.logistics-alert { min-height: 62px; padding: 12px 16px; display: grid; grid-template-columns: 22px minmax(0,1fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); border-left: 3px solid var(--amber); }
.logistics-alert.high { border-left-color: var(--red); background: #fffafa; }
.logistics-alert > i { color: var(--amber); }
.logistics-alert.high > i { color: var(--red); }
.logistics-alert strong, .logistics-alert small { display: block; }
.logistics-alert small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.secondary-button.small, .primary-button.small { min-height: 32px; padding: 0 10px; font-size: 11px; }
.split-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.report-business-entries { display: grid; gap: 10px; margin-bottom: 10px; }
.report-business-entry { padding: 12px; border: 1px solid var(--line); background: var(--surface-subtle); }
.report-business-head { display: grid; grid-template-columns: minmax(0,1fr) 34px; align-items: end; gap: 10px; }
.report-business-head label { margin: 0; }
.report-business-head .icon-button { margin-bottom: 1px; }
.report-entry-metrics { margin: 10px 0; grid-template-columns: repeat(4,minmax(0,1fr)); }
.report-entry-metrics label { min-width: 0; margin: 0; }
.report-business-entry > label:last-child { margin-top: 9px; }
.report-business-entry textarea { min-height: 58px; }
.report-business-summary { margin: 10px 0; display: grid; gap: 5px; }
.report-business-summary > span { min-width: 0; padding: 7px 9px; display: grid; grid-template-columns: minmax(100px,.45fr) minmax(0,1fr); gap: 9px; border-left: 3px solid var(--blue); background: var(--blue-soft); }
.report-business-summary b, .report-business-summary small { overflow-wrap: anywhere; }
.report-business-summary small { color: #4c607c; }
.result-line { margin-top: 10px !important; color: var(--green) !important; }
.inline-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.inline-header h4 { margin: 0; }
.alert-history, .employee-detail-row { padding: 11px 0; border-bottom: 1px solid var(--line); }
.alert-history { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 10px; align-items: start; }
.alert-history strong, .alert-history small, .employee-detail-row strong { display: block; }
.alert-history small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.employee-window-head { display: flex; align-items: center; gap: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.employee-window-head h3, .employee-window-head p { margin: 0; }
.employee-window-head p { margin-top: 5px; color: #4c5664; font-size: 12px; }
.employee-window-head small { display: block; margin-top: 5px; color: var(--muted); }
.avatar.large { width: 48px; height: 48px; font-size: 16px; background: #e9edf2; }
.mini-metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); border-bottom: 1px solid var(--line); }
.mini-metrics div { padding: 16px 9px; text-align: center; border-right: 1px solid var(--line); }
.mini-metrics div:last-child { border-right: 0; }
.mini-metrics strong, .mini-metrics span { display: block; }
.mini-metrics strong { font-size: 20px; }
.mini-metrics span { margin-top: 5px; color: var(--muted); font-size: 9px; }
.employee-detail-row p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.employee-detail-row.alert-line strong { color: var(--red); }
.access-role { display: inline-flex; padding: 4px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.role-management { color: #7a4810; background: #fff1d8; }
.role-department_leader { color: var(--blue); background: var(--blue-soft); }
.role-employee { color: var(--muted); background: #edf0f3; }
.detail-actions { margin-top: 16px; }

@media (max-width: 1100px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .project-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .monitor-owner-group > summary, .monitor-platform-group > summary { align-items: flex-start; flex-wrap: wrap; }
  .social-level-metrics { max-width: none; justify-content: flex-start; padding-left: 26px; }
}

@media (max-width: 820px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-panel { max-width: none; min-height: auto; padding: 46px 24px; }
  .auth-panel-tututoo { min-height: 100vh; }
  .auth-panel-jiding { min-height: 100vh; }
  .auth-panel-lanqier { min-height: 100vh; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -245px; width: 224px; transition: left .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { left: 0; }
  .mobile-only { display: inline-flex; }
  .topbar { padding: 13px 16px; min-height: 72px; justify-content: flex-start; }
  .topbar > div:nth-child(2) { min-width: 0; }
  .topbar h1 { font-size: 18px; }
  .topbar-actions { margin-left: auto; }
  .topbar-actions .secondary-button span { display: none; }
  .view-root { padding: 16px 14px 40px; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .update-card { grid-template-columns: 100px minmax(0,1fr); }
  .update-progress { grid-column: 2; text-align: left; display: flex; align-items: center; gap: 12px; }
  .dialog { width: 100%; }
  .monitor-actions { align-items: stretch; }
  .monitor-actions .filters { margin-left: auto; }
  .change-row { grid-template-columns: 40px minmax(0,1fr); }
  .change-values { grid-column: 2; justify-content: flex-start; }
  .mini-metrics { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .mini-metrics div:nth-child(3) { border-right: 0; }
  .mini-metrics div:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .social-period-toolbar { align-items: stretch; flex-direction: column; }
  .social-detail-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .social-detail-metrics > div:nth-child(2) { border-right: 0; }
  .social-detail-metrics > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .social-comment-row { grid-template-columns: 1fr; }
  .social-platform-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 560px) {
  .report-entry-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .topbar { max-width: 100%; overflow: hidden; }
  .topbar-actions { flex: 1 1 auto; min-width: 0; max-width: calc(100% - 46px); gap: 6px; overflow-x: auto; justify-content: flex-end; scrollbar-width: none; }
  .topbar-actions::-webkit-scrollbar { display: none; }
  .topbar-actions #primary-action-button { width: 40px; padding: 0; }
  .topbar-actions #primary-action-button span { display: none; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 105px; padding: 16px; }
  .metric strong { font-size: 27px; }
  .metric small { font-size: 10px; }
  .risk-row { grid-template-columns: 1fr; }
  .risk-tags { justify-content: flex-start; max-width: none; }
  .toolbar { align-items: stretch; }
  .filters, .search-field { width: 100%; }
  .toolbar select { flex: 1; min-width: 0; }
  .update-card { grid-template-columns: 1fr; gap: 13px; }
  .update-progress { grid-column: 1; }
  .form-grid, .definition-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .form-actions { grid-column: auto; }
  #dialog-body { padding: 20px 16px; }
  .view-intro { align-items: center; }
  .view-intro h2 { font-size: 16px; }
  .livestream-intro { align-items: stretch; flex-direction: column; }
  .livestream-intro-actions { justify-content: space-between; align-items: stretch; }
  .livestream-mirror-download { min-width: 0; flex: 1; }
  .monitor-actions .filters { width: 100%; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .monitor-actions .filters button { padding: 0 8px; min-width: 0; }
  .logistics-alert { grid-template-columns: 20px minmax(0,1fr); }
  .logistics-alert > div:last-child { grid-column: 2; }
  .split-fields { grid-column: auto; }
  .social-level-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; padding-left: 0; }
  .social-level-metrics > span { white-space: normal; }
  .monitor-owner-summary-actions { width: 100%; justify-content: space-between; padding-left: 26px; }
  .monitor-owner-summary-actions .social-level-metrics { width: auto; display: flex; }
  .social-detail-metrics, .social-comment-summary { grid-template-columns: 1fr; }
  .social-detail-metrics > div, .social-comment-summary span { border-right: 0; border-bottom: 1px solid var(--line); }
  .social-detail-metrics > div:last-child, .social-comment-summary span:last-child { border-bottom: 0; }
  .social-platform-options { grid-template-columns: 1fr; }
}

/* v3: employee analysis, assessments and livestream operations */
.intelligence-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(320px,.65fr); gap: 20px; margin-top: 20px; align-items: stretch; }
.intelligence-grid .section { margin-top: 0; }
.ai-analysis { border-top: 3px solid var(--blue); }
.ai-analysis .section-body h3 { margin: 0 0 9px; font-size: 16px; line-height: 1.5; }
.ai-analysis .section-body > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.analysis-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border-radius: 4px; background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 700; white-space: nowrap; }
.analysis-actions { display: grid; gap: 8px; margin-top: 16px; }
.analysis-actions div, .evidence-list div { display: flex; gap: 9px; align-items: flex-start; color: #455062; font-size: 12px; line-height: 1.55; }
.analysis-actions i, .evidence-list i { width: 15px; height: 15px; margin-top: 2px; color: var(--blue); }
.ranking-list { display: grid; }
.ranking-list button { width: 100%; min-height: 54px; padding: 8px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; display: grid; grid-template-columns: 28px minmax(0,1fr) 40px; align-items: center; gap: 9px; text-align: left; }
.ranking-list button:last-child { border-bottom: 0; }
.ranking-list button:hover { background: var(--surface-subtle); }
.ranking-list strong, .ranking-list small { display: block; }
.ranking-list small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.rank-index { color: var(--muted); font-size: 11px; font-weight: 700; }
.score-good { color: var(--green) !important; }
.score-medium { color: var(--amber) !important; }
.score-low { color: var(--red) !important; }
.score-pill { display: inline-grid; min-width: 37px; height: 29px; place-items: center; border: 1px solid currentColor; border-radius: 4px; font-weight: 800; }
.personal-analysis { margin-top: 20px; border-top: 3px solid var(--blue); }
.personal-score { min-width: 54px; font-size: 28px; font-weight: 800; text-align: right; }
.personal-analysis-body { padding: 18px; }
.personal-analysis-body > p { margin: 0 0 17px; color: #465263; line-height: 1.7; }
.personal-period-trend { margin-top: 20px; border-top: 3px solid var(--green); }
.personal-period-metrics { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.personal-period-metrics > span { min-width: 0; padding: 14px 16px; border-right: 1px solid var(--line); display: grid; gap: 5px; }
.personal-period-metrics > span:last-child { border-right: 0; }
.personal-period-metrics small { color: var(--muted); font-size: 10px; }
.personal-period-metrics strong { overflow-wrap: anywhere; font-size: 18px; }
.employee-period-ai { margin: 16px; padding: 16px; border-left: 4px solid var(--blue); background: var(--surface-subtle); }
.employee-period-ai.tone-good { border-left-color: var(--green); background: var(--green-soft); }
.employee-period-ai.tone-medium { border-left-color: var(--amber); background: var(--amber-soft); }
.employee-period-ai.tone-low { border-left-color: var(--red); background: var(--red-soft); }
.employee-period-ai.tone-pending { border-left-color: var(--muted); }
.employee-period-ai h3 { margin: 13px 0 6px; font-size: 16px; line-height: 1.55; }
.employee-period-ai > p { margin: 0; color: #465263; line-height: 1.7; }
.employee-period-ai.awaiting { display: flex; align-items: flex-start; gap: 11px; }
.employee-period-ai.awaiting > i { margin-top: 2px; color: var(--muted); }
.employee-period-ai.awaiting strong, .employee-period-ai.awaiting small { display: block; }
.employee-period-ai.awaiting small { margin-top: 5px; color: var(--muted); line-height: 1.55; }
.period-analysis-lines { margin-top: 14px; display: grid; gap: 6px; }
.period-analysis-lines > strong { font-size: 11px; }
.period-analysis-lines > span { padding-left: 12px; border-left: 2px solid var(--line); color: #465263; font-size: 11px; line-height: 1.55; }
.trend-inline { display: inline-flex !important; width: fit-content; min-height: 23px; align-items: center; margin-top: 6px; padding: 2px 7px; border-radius: 4px; font-weight: 700; }
.trend-inline.tone-good { color: var(--green); background: var(--green-soft); }
.trend-inline.tone-medium { color: var(--amber); background: var(--amber-soft); }
.trend-inline.tone-low { color: var(--red); background: var(--red-soft); }
.analysis-running i { animation: rotate .9s linear infinite; }
.analysis-columns { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.analysis-columns div { border-left: 2px solid var(--line); padding-left: 12px; }
.analysis-columns strong, .analysis-columns span { display: block; }
.analysis-columns strong { margin-bottom: 7px; font-size: 12px; }
.analysis-columns span { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.employee-analysis-table { min-width: 1180px; }
.employee-analysis-table tbody tr, .data-table tbody tr[data-livestream] { cursor: pointer; }
.employee-analysis-hierarchy { border-top: 1px solid var(--line); }
.employee-analysis-company, .employee-analysis-department { border-bottom: 1px solid var(--line); }
.employee-analysis-company > summary, .employee-analysis-department > summary { min-height: 48px; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; background: var(--surface-subtle); }
.employee-analysis-company > summary span, .employee-analysis-department > summary span { display: flex; align-items: center; gap: 8px; }
.employee-analysis-company > summary i, .employee-analysis-department > summary i { width: 16px; height: 16px; color: var(--blue); }
.employee-analysis-company > summary small, .employee-analysis-department > summary small { color: var(--muted); text-align: right; }
.employee-analysis-company-body { padding-left: 18px; }
.employee-analysis-department > summary { min-height: 42px; background: var(--surface); border-left: 3px solid var(--blue-soft); }
.employee-analysis-department .data-table-wrap { border-top: 1px solid var(--line); }
.summary-work { max-width: 240px; line-height: 1.55; }
.data-scope-line { white-space: nowrap; }
.analysis-conclusion { min-width: 285px; max-width: 420px; }
.analysis-conclusion strong { display: block; font-size: 12px; }
.analysis-conclusion p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.analysis-conclusion small { display: block; margin-top: 5px; font-size: 10px; }
.kpi-section { margin-top: 20px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.kpi-item { min-height: 112px; padding: 15px 16px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px 10px; }
.kpi-item:nth-child(4n) { border-right: 0; }
.kpi-item:hover { background: var(--surface-subtle); }
.kpi-item strong, .kpi-item small { display: block; }
.kpi-item small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.kpi-item > span { color: var(--blue); font-weight: 800; }
.kpi-item > p { grid-column: 1/-1; margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.config-block { min-width: 0; margin: 0; border: 1px solid var(--line); padding: 14px; }
.config-block legend { padding: 0 6px; color: var(--ink); font-size: 13px; font-weight: 700; }
.config-block > p { margin: 0 0 12px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.form-collapsible { min-width: 0; border: 1px solid var(--line); background: var(--surface); }
.form-collapsible > summary { min-height: 58px; padding: 11px 14px; list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.form-collapsible > summary::-webkit-details-marker { display: none; }
.form-collapsible > summary:hover { background: var(--surface-subtle); }
.form-collapsible > summary span, .form-collapsible > summary strong, .form-collapsible > summary small { min-width: 0; display: block; }
.form-collapsible > summary strong { font-size: 13px; }
.form-collapsible > summary small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.form-collapsible > summary > i { flex: 0 0 auto; color: var(--muted); transition: transform .16s ease; }
.form-collapsible[open] > summary > i { transform: rotate(90deg); }
.form-collapsible > .config-block { border: 0; border-top: 1px solid var(--line); }
.checkbox-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; max-height: 280px; overflow-y: auto; }
.check-option { min-width: 0; min-height: 58px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 5px; display: flex; align-items: flex-start; gap: 9px; background: var(--surface); }
.check-option:has(input:checked) { border-color: #8aaee5; background: var(--blue-soft); }
.check-option input { width: 17px; min-height: 17px; margin: 2px 0 0; flex: none; }
.check-option span, .check-option strong, .check-option small { min-width: 0; display: block; }
.check-option strong { font-size: 12px; }
.check-option small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.employee-window-head { position: relative; }
.employee-window-score { margin-left: auto; min-width: 58px; font-size: 28px; font-weight: 800; text-align: center; }
.employee-window-score small { margin-top: 1px; color: var(--muted); font-size: 9px; font-weight: 600; }
.mini-metrics.six { grid-template-columns: repeat(6,minmax(0,1fr)); }
.employee-analysis-detail h3 { margin: 0 0 8px; font-size: 15px; line-height: 1.5; }
.employee-analysis-detail > p { margin-top: 0; }
.evidence-list { display: grid; gap: 7px; padding: 12px; background: var(--surface-subtle); }
.analysis-note { margin-top: 12px; padding-left: 12px; border-left: 3px solid var(--blue); }
.analysis-note.warning { border-left-color: var(--amber); }
.analysis-note strong { font-size: 11px; }
.analysis-note p { margin: 4px 0 0; }
.responsibility-row { min-height: 66px; padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.responsibility-row:last-child { border-bottom: 0; }
.responsibility-row > div { min-width: 0; }
.responsibility-row strong, .responsibility-row small { display: block; }
.responsibility-row small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.review-result { display: inline-flex; margin-top: 7px; padding: 3px 6px; border-radius: 4px; background: #edf0f3; color: var(--muted); font-size: 10px; font-weight: 700; }
.result-excellent, .result-pass { color: var(--green); background: var(--green-soft); }
.result-needs_improvement { color: var(--red); background: var(--red-soft); }
.kpi-detail-row { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.kpi-detail-row:hover { background: var(--surface-subtle); }

@media (max-width: 1100px) {
  .intelligence-grid { grid-template-columns: 1fr; }
  .personal-period-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .personal-period-metrics > span:nth-child(3) { border-right: 0; }
  .kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .kpi-item:nth-child(4n) { border-right: 1px solid var(--line); }
  .kpi-item:nth-child(2n) { border-right: 0; }
  .mini-metrics.six { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 560px) {
  .personal-period-trend .section-header { align-items: stretch; }
  .personal-period-trend .segmented { width: 100%; }
  .personal-period-trend .segmented button { flex: 1; min-width: 0; }
  .personal-period-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .personal-period-metrics > span:nth-child(3) { border-right: 1px solid var(--line); }
  .personal-period-metrics > span:nth-child(2n) { border-right: 0; }
  .employee-period-ai { margin: 12px; padding: 13px; }
  .suggestion-summary-grid { grid-template-columns: 1fr; }
  .suggestion-summary-company > header, .suggestion-summary-department { align-items: flex-start; }
  .suggestion-summary-company > header { flex-direction: column; }
  .suggestion-summary-department > span:last-child { text-align: right; }
  .suggestion-company > summary, .suggestion-department > summary, .suggestion-leader > summary, .suggestion-employee > summary { align-items: flex-start; }
  .suggestion-company > summary > span:first-child, .suggestion-department > summary > span:first-child, .suggestion-leader > summary > span:first-child, .suggestion-employee > summary > span:first-child { align-items: flex-start; flex-direction: column; gap: 2px; }
  .suggestion-company > summary > span:last-child, .suggestion-employee > summary > span:last-child { text-align: right; }
  .suggestion-company > div { padding: 0 6px 6px; }
  .suggestion-department > div, .suggestion-leader > div { padding: 0 5px 5px; }
  .analysis-columns, .checkbox-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi-item, .kpi-item:nth-child(2n), .kpi-item:nth-child(4n) { border-right: 0; }
  .employee-window-score { font-size: 24px; }
  .mini-metrics.six { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mini-metrics.six div { border-bottom: 1px solid var(--line); }
  .mini-metrics.six div:nth-child(2n) { border-right: 0; }
  .responsibility-row { align-items: flex-start; }
}

/* v4: evidence, warnings, business modules, finance and archive */
.section-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.connection-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.connection-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; flex: 0 0 auto; }
.secure-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid #bdd8ca; background: #f2f8f5; color: #183e2c; }
.secure-note > i { width: 20px; height: 20px; flex: 0 0 auto; }
.secure-note strong, .secure-note p { display: block; margin: 0; }
.secure-note p { margin-top: 5px; color: #476356; font-size: 11px; line-height: 1.55; }
.segmented.compact button { min-height: 32px; padding: 0 10px; font-size: 10px; }
.analysis-period-header { align-items: flex-start; }
.analysis-period-header > div:first-child small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.role-owner { color: var(--red); background: var(--red-soft); }
.danger-icon { color: var(--red); }
.danger-button { border: 1px solid #c54b4e; background: var(--red); color: white; min-height: 40px; border-radius: 6px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; white-space: nowrap; }
.danger-button:hover { background: #9f282b; }
.danger-button.small { min-height: 34px; padding: 0 10px; font-size: 11px; }
.task-delete-zone { margin-top: 8px; padding: 14px; border: 1px solid #edc2c4; background: var(--red-soft); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.task-delete-zone small { color: #7f3437; line-height: 1.5; }
.sms-template-list { border: 1px solid var(--line); background: var(--surface); padding: 14px; }
.sms-template-list h4 { margin: 0 0 8px; font-size: 13px; }
.sms-template-row { min-height: 46px; padding: 8px 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sms-template-row span, .sms-template-row strong, .sms-template-row small { display: block; min-width: 0; }
.sms-template-row small { margin-top: 3px; color: var(--muted); }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.archive-badge { display: inline-flex; vertical-align: middle; margin-left: 6px; padding: 3px 7px; border-radius: 4px; background: #e9edf2; color: var(--muted); font-size: 10px; }
.muted-text { color: var(--muted); }
.recent-business-row { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }
.recent-business-row:hover { background: var(--surface-subtle); }
.recent-business-row > span { min-width: 0; }
.inventory-price-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.price-currency-field { min-width: 0; padding: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; grid-template-columns: minmax(0,1fr) 116px; gap: 10px; }
.price-currency-field small { grid-column: 1/-1; color: var(--blue); font-size: 11px; }
.inventory-finance-section { margin-top: 20px; }
.inventory-finance-section .metrics-grid { border-width: 0 0 1px; }
.inventory-finance-section .metric strong { font-size: 18px; line-height: 1.35; overflow-wrap: anywhere; }
.warning-button { border: 1px solid #e2a126; background: #fff8e9; color: #895006; min-height: 34px; padding: 0 11px; border-radius: 6px; display: inline-flex; align-items: center; gap: 7px; font-weight: 700; white-space: nowrap; }

.evidence-upload { background: #f8fafb; }
.upload-box { min-height: 70px; border-radius: 6px; display: grid; grid-template-columns: 22px minmax(0,1fr); align-items: center; gap: 10px; cursor: pointer; }
.upload-box span { color: var(--ink); font-size: 12px; }
.upload-box span strong,.upload-box span small { display: block; }
.upload-box span strong { font-size: 13px; }
.upload-box span small { margin-top: 3px; color: var(--muted); font-weight: 500; }
.upload-box input { grid-column: 1/-1; }
.inventory-workbook-upload { border-color: #2f70c9; background: #f4f8ff; }
.inventory-supplemental-images { padding: 0; overflow: hidden; }
.inventory-supplemental-images > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.inventory-supplemental-images > summary::-webkit-details-marker { display: none; }
.inventory-supplemental-images > summary::after { content: '展开'; color: var(--accent); font-size: 12px; font-weight: 700; }
.inventory-supplemental-images[open] > summary::after { content: '收起'; }
.inventory-supplemental-images > summary strong,.inventory-supplemental-images > summary small { display: block; }
.inventory-supplemental-images > summary small { margin-top: 3px; color: var(--muted); font-weight: 500; }
.inventory-supplemental-images-body { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.file-evidence-list, .report-files { display: grid; gap: 7px; }
.file-evidence-list { margin-bottom: 12px; }
.file-evidence, .report-files a { min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 9px; }
.file-evidence:hover, .report-files a:hover { border-color: #96afd5; background: var(--blue-soft); }
.file-evidence span, .report-files a span { min-width: 0; }
.file-evidence strong, .file-evidence small, .report-files a > span, .report-files small { display: block; overflow-wrap: anywhere; }
.file-evidence small, .report-files small, .no-evidence { margin-top: 3px; color: var(--muted); font-size: 10px; }
.report-files { margin-top: 9px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.report-files a > i { color: var(--blue); }
.report-detail-row { padding-bottom: 14px; }
.report-evidence-card { align-items: start; }

.warning-center, .warning-list { display: grid; }
.warning-row { width: 100%; min-height: 58px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); border-left: 3px solid #d5a52b; background: transparent; display: grid; grid-template-columns: 145px minmax(0,1fr) auto; align-items: center; gap: 10px; text-align: left; }
.warning-row.warning-orange { border-left-color: #d47916; }
.warning-row.warning-red { border-left-color: var(--red); background: #fffafa; }
.warning-row:hover { background: var(--surface-subtle); }
.warning-row span { color: var(--amber); font-size: 10px; font-weight: 800; }
.warning-row.warning-orange span, .warning-orange { color: #a95108; }
.warning-row.warning-red span, .warning-red { color: var(--red); }
.warning-row small { color: var(--muted); font-size: 10px; text-align: right; }
.warning-card { border-left: 3px solid var(--amber); }
.warning-card.warning-red { border-left-color: var(--red); }
.warning-detail { border-left: 4px solid #d5a52b; padding-left: 16px; }
.warning-detail.warning-orange { border-left-color: #d47916; }
.warning-detail.warning-red { border-left-color: var(--red); }
.warning-detail-meta { display: flex; gap: 8px 16px; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.warning-detail section { padding: 13px 0; border-bottom: 1px solid var(--line); }
.warning-detail section p { margin: 6px 0 0; line-height: 1.7; color: #4a5565; }
.warning-actions { margin-top: 16px; }

.metric-input-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.checkbox-card { min-height: 58px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-subtle); display: flex; align-items: center; gap: 10px; }
.checkbox-card input { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; }
.checkbox-card span, .checkbox-card strong, .checkbox-card small { display: block; }
.checkbox-card small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.platform-checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.sourcing-platform-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.sourcing-platform-chips span { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 7px; border: 1px solid #b8c7dd; border-radius: 4px; background: #eef4ff; color: #164a8a; font-size: 11px; font-weight: 700; line-height: 1.25; }
.sourcing-row-actions { display: grid !important; grid-template-columns: repeat(2, max-content); align-items: center; justify-content: start; gap: 7px !important; min-width: 210px; }
.sourcing-row-actions .cell-sub { grid-column: 1 / -1; max-width: 230px; white-space: normal; }
@media (max-width: 640px) { .platform-checkbox-grid { grid-template-columns: 1fr; } .sourcing-platform-chips span { max-width: 100%; overflow-wrap: anywhere; } }
.wide-live-table { min-width: 1700px; }
.sourcing-toolbar { align-items: stretch; }
.sourcing-sales-analysis { display: grid; gap: 16px; }
.sourcing-sales-analysis-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.sourcing-sales-analysis-table td { vertical-align: top; }
.inventory-movement-list { border-top: 1px solid var(--line); }
.inventory-movement-row { min-height: 58px; padding: 10px 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(220px,1fr) minmax(120px,.35fr) minmax(100px,.25fr); align-items: center; gap: 12px; }
.inventory-movement-row:last-child { border-bottom: 0; }
.inventory-movement-row strong, .inventory-movement-row small { display: block; overflow-wrap: anywhere; }
.inventory-movement-row small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.inventory-movement-row span:nth-child(2) { color: var(--muted); font-size: 11px; }
.inventory-movement-row b { text-align: right; font-size: 13px; }
.inventory-movement-row.inbound b { color: var(--green); }
.inventory-movement-row.outbound b { color: var(--red); }
.site-toolbar { align-items: flex-start; }
.site-toolbar .section-actions { margin-left: auto; }
.inquiry-list, .email-connections { display: grid; }
.inquiry-row { width: 100%; min-height: 64px; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 10px 14px; display: grid; grid-template-columns: minmax(150px,.7fr) minmax(220px,1.3fr) auto; align-items: center; gap: 12px; text-align: left; }
.inquiry-row:hover { background: var(--surface-subtle); }
.inquiry-row strong, .inquiry-row small { display: block; }
.inquiry-row small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.account-link { width: max-content; margin-top: 5px; color: var(--blue); font-size: 10px; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.account-link i { width: 13px; height: 13px; }
.account-nature-summary { margin-bottom: 14px; display: grid; grid-template-columns: minmax(180px,1fr) repeat(4,minmax(82px,auto)); border: 1px solid var(--line); background: var(--surface); }
.account-nature-summary > div { min-height: 48px; padding: 8px 12px; border-right: 1px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 8px; }
.account-nature-summary > div:last-child { border-right: 0; }
.account-nature-summary > div:first-child { display: block; }
.account-nature-summary > div:first-child span { display: block; font-size: 11px; font-weight: 800; }
.account-nature-summary > div:first-child small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.account-nature-summary > div:not(:first-child) strong { font-size: 16px; }
.account-nature-summary > div:not(:first-child) span { font-size: 10px; color: var(--muted); }
.account-platform-summary { display: grid; grid-template-columns: minmax(180px,1.5fr) repeat(auto-fit,minmax(90px,1fr)); align-items: stretch; overflow: visible; }
.account-platform-summary > div { min-width: 0; border-bottom: 0; }
.account-platform-summary > .account-summary-title { justify-content: center; }
.account-summary-cell { white-space: nowrap; }
.account-summary-cell[data-account-platform] { border: 0; border-right: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; font: inherit; }
.account-summary-cell[data-account-platform]:hover { background: var(--surface-subtle); }
.account-summary-cell[data-account-platform]:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.account-summary-cell[data-account-platform].active { background: var(--blue-soft); box-shadow: inset 0 -3px var(--blue); }
.account-platform-summary > .account-summary-cell { min-height: 48px; padding: 8px 12px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.account-summary-cell strong { color: var(--text); font-size: 20px !important; }
.account-summary-cell.platform strong { color: var(--blue); }
.account-summary-cell span { color: var(--muted); font-size: 11px !important; }
.monitor-platform-group.summary-focus-group { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-soft); }
.monitor-leaf-row.summary-focus-target { position: relative; scroll-margin-top: 92px; background: var(--amber-soft); box-shadow: inset 4px 0 var(--amber); animation: summaryFocusPulse 1.1s ease-in-out 3; }
.monitor-leaf-row.summary-focus-muted { opacity: .42; filter: saturate(.55); }
@keyframes summaryFocusPulse { 0%,100% { background: var(--amber-soft); } 50% { background: #ffe4b8; } }
.risk-high { color: var(--red); font-weight: 800; }
.risk-medium { color: var(--amber); font-weight: 800; }
.risk-low { color: var(--green); font-weight: 800; }
.risk-row-bg { background: #fffafa; }

.month-control { min-width: 180px; }
.month-control input { margin-top: 5px; }
.company-strategy { border-top: 3px solid var(--purple); }
.strategy-body { padding: 18px; display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 22px; }
.strategy-body h3 { margin: 0 0 8px; font-size: 16px; }
.strategy-body p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.strategy-body p i { display: inline-block; width: 13px; height: 13px; margin-right: 6px; vertical-align: -2px; color: var(--blue); }
.bonus-preview { border-top: 3px solid var(--green); }
.finance-summary-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin: 20px 0; }
.finance-summary-grid .section { margin: 0; }
.finance-overall-summary { border-top: 3px solid var(--blue); }
.finance-overall-summary > .metrics-grid { margin: 0; }
.owner-company-finance + .finance-summary-grid { margin-top: 0; }
.finance-breakdown { display: grid; }
.finance-breakdown > div { min-height: 58px; padding: 10px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.finance-breakdown span strong, .finance-breakdown span small { display: block; }
.finance-breakdown span small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.finance-table { min-width: 1220px; }

/* task assignment, evidence and automated acceptance */
.task-table { min-width: 1120px; }
.task-unread td:first-child { box-shadow: inset 3px 0 var(--blue); }
.new-task-tag { display: inline-flex; margin-left: 7px; padding: 2px 5px; border-radius: 3px; background: var(--blue-soft); color: var(--blue); font-size: 9px; vertical-align: 1px; }
.task-progress-control { padding: 14px; }
.task-progress-value { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.task-progress-value output { color: var(--ink); font-size: 20px; font-weight: 800; }
.task-progress-range { width: 100%; height: 28px; margin: 8px 0 6px; accent-color: var(--blue); cursor: pointer; }
.task-progress-presets { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px; }
.task-progress-presets button { min-width: 0; min-height: 34px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--muted); font-size: 11px; font-weight: 700; }
.task-progress-presets button:hover, .task-progress-presets button.active { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.task-progress-control > small, .task-evidence-upload > small { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.task-definition { padding: 12px 14px; border-left: 3px solid var(--blue); background: var(--surface-subtle); }
.task-definition strong, .task-definition small { display: block; }
.task-definition p { margin: 6px 0; color: #4c5664; line-height: 1.55; }
.task-verification { padding: 14px; border: 1px solid var(--line); border-top: 3px solid var(--green); background: var(--surface-subtle); }
.task-verification-actions { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
.task-verification.needs-revision { border-top-color: var(--red); }
.task-verification .inline-header { margin-bottom: 10px; }
.task-verification .inline-header strong, .task-verification .inline-header small, .task-verification > small { display: block; }
.task-verification h4 { margin: 8px 0 5px; }
.task-verification p { margin: 0 0 8px; color: #4c5664; line-height: 1.55; }
.task-verification > small { margin-top: 5px; color: var(--muted); line-height: 1.5; }
.task-quality-score { min-width: 66px; text-align: right; color: var(--green); font-size: 23px; font-weight: 800; }
.task-quality-score small { color: var(--muted); font-size: 9px; font-weight: 600; }
.task-child-row td:first-child { padding-left: 28px; }
.task-child-mark { display: inline-grid; width: 20px; height: 20px; margin-right: 7px; place-items: center; border: 1px solid #aec7ea; border-radius: 3px; background: var(--blue-soft); color: var(--blue); font-size: 9px; font-weight: 800; vertical-align: middle; }
.task-verification-config { border-left: 3px solid var(--blue); background: var(--surface-subtle); }
.task-auto-check { align-items: flex-start; padding: 2px 0 12px; }
.task-auto-check span, .task-auto-check strong, .task-auto-check small { display: block; }
.task-auto-check small { margin-top: 5px; color: var(--muted); line-height: 1.55; }
.task-verification-config [data-task-verification-instructions] { margin-top: 5px; transition: opacity .15s ease; }
.task-verification-config [data-task-verification-instructions].is-disabled { opacity: .48; }
.task-parent-reference { min-width: 0; padding: 11px 13px; border-left: 3px solid var(--blue); background: var(--blue-soft); display: flex; align-items: center; gap: 10px; }
.task-parent-reference i { flex: 0 0 18px; width: 18px; height: 18px; color: var(--blue); }
.task-parent-reference span, .task-parent-reference strong, .task-parent-reference small { min-width: 0; display: block; }
.task-parent-reference small { margin-top: 4px; color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.task-delegation { min-width: 0; border: 1px solid var(--line); border-top: 3px solid var(--blue); background: var(--surface); }
.task-delegation > .inline-header { padding: 13px 14px; border-bottom: 1px solid var(--line); }
.task-delegation > .inline-header strong, .task-delegation > .inline-header small { display: block; }
.task-delegation > .inline-header small { margin-top: 4px; color: var(--muted); line-height: 1.45; }
.task-delegation > .form-hint { padding: 0 14px 13px; }
.task-child-item { width: 100%; min-width: 0; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); display: grid; grid-template-columns: minmax(0,1fr) minmax(105px,150px) 18px; align-items: center; gap: 12px; text-align: left; }
.task-child-item:last-child { border-bottom: 0; }
.task-child-item:hover { background: var(--surface-subtle); }
.task-child-item span, .task-child-item strong, .task-child-item small { min-width: 0; display: block; }
.task-child-item strong { overflow-wrap: anywhere; }
.task-child-item small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.task-child-item > i { width: 16px; height: 16px; color: var(--muted); }
.task-child-progress { display: grid; grid-template-columns: minmax(0,1fr) 34px; align-items: center; gap: 7px; }
.task-child-progress b { color: var(--blue); font-size: 10px; text-align: right; }

/* v5: versioned KPI trial center */
.kpi-trial-banner { border-left: 4px solid var(--blue); }
.kpi-trial-banner .section-header { border-bottom: 0; }
.kpi-toolbar { justify-content: flex-start; }
.kpi-toolbar .month-control { flex: 0 0 190px; }
.kpi-toolbar .search-field { flex: 1 1 280px; }
.kpi-group-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.kpi-group-button { min-width: 0; min-height: 78px; padding: 12px 14px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; text-align: left; }
.kpi-group-button:nth-child(3n) { border-right: 0; }
.kpi-group-button:hover { background: var(--surface-subtle); }
.kpi-group-button.active { box-shadow: inset 4px 0 var(--blue); background: var(--blue-soft); }
.kpi-group-button span { min-width: 0; }
.kpi-group-button strong, .kpi-group-button small, .kpi-group-button b { display: block; }
.kpi-group-button strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.kpi-group-button small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.kpi-group-button b { color: var(--blue); text-align: right; font-size: 15px; }
.kpi-center-table { min-width: 1220px; }
.kpi-center-table td { vertical-align: top; }
.check-option.disabled { background: #f1f3f5; color: var(--muted); cursor: default; opacity: .75; }
.check-option.disabled:has(input:checked) { border-color: var(--line); background: #f1f3f5; }

@media (max-width: 900px) {
  .strategy-body { grid-template-columns: 1fr; }
  .finance-summary-grid { grid-template-columns: 1fr; }
  .metric-input-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .report-files { grid-template-columns: 1fr; }
  .warning-row { grid-template-columns: 120px minmax(0,1fr); }
  .warning-row small { grid-column: 2; text-align: left; }
  .kpi-group-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .kpi-group-button:nth-child(3n) { border-right: 1px solid var(--line); }
  .kpi-group-button:nth-child(2n) { border-right: 0; }
  .inventory-price-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .section-actions { width: 100%; justify-content: flex-start; }
  .analysis-period-header { display: grid; }
  .analysis-period-header .segmented { width: 100%; }
  .metric-input-grid { grid-template-columns: 1fr; }
  .warning-row, .inquiry-row { grid-template-columns: 1fr; }
  .warning-row small { grid-column: auto; }
  .site-toolbar .section-actions { margin-left: 0; }
  .kpi-toolbar .month-control, .kpi-toolbar .search-field { flex-basis: 100%; width: 100%; min-width: 0; }
  .kpi-group-list { grid-template-columns: 1fr; }
  .kpi-group-button, .kpi-group-button:nth-child(2n), .kpi-group-button:nth-child(3n) { border-right: 0; }
  .sourcing-toolbar > .search-field, .sourcing-toolbar > button { width: 100%; }
  .inventory-movement-row { grid-template-columns: 1fr auto; }
  .inventory-movement-row span:nth-child(2) { grid-column: 1; }
  .inventory-movement-row b { grid-column: 2; grid-row: 1 / span 2; }
  .price-currency-field { grid-template-columns: 1fr; }
  .price-currency-field small { grid-column: auto; }
  .inventory-finance-section .metric strong { font-size: 16px; }
}

/* v6: local product and public-web comparison */
.product-comparison-section { overflow: hidden; }
.dashboard-product-comparison { overflow: hidden; }
.dashboard-comparison-list { display: grid; }
.dashboard-comparison-row { width: 100%; min-width: 0; padding: 14px 18px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; grid-template-columns: minmax(190px,.9fr) minmax(150px,.55fr) minmax(300px,1.5fr) 36px; gap: 16px; align-items: center; text-align: left; }
.dashboard-comparison-row:last-child { border-bottom: 0; }
.dashboard-comparison-row:hover { background: var(--surface-subtle); }
.dashboard-comparison-row > span { min-width: 0; }
.dashboard-comparison-row strong, .dashboard-comparison-row small { display: block; overflow-wrap: anywhere; }
.dashboard-comparison-row small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.dashboard-comparison-state .risk-tag, .dashboard-comparison-state .status-tag { display: inline-flex; }
.dashboard-comparison-result { min-width: 0; max-width: 100%; }
.dashboard-comparison-result p { min-width: 0; max-width: 100%; margin: 5px 0 0; color: #4c5664; font-size: 11px; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; word-break: break-word; }
.dashboard-comparison-result > small { color: var(--blue); }
.dashboard-comparison-open { color: var(--muted); }
.profile-shortcut { width: fit-content; min-height: 26px; margin-top: 5px; padding: 3px 8px; border: 1px solid #e5b467; border-radius: 4px; background: var(--amber-soft); color: #9a5b00; font-size: 10px; font-weight: 800; cursor: pointer; }
.profile-shortcut:hover { border-color: #bf7b14; background: #fff0d2; }
.source-gap-button { max-width: 100%; text-align: left; white-space: normal; line-height: 1.35; }
.comparison-flow { min-height: 48px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface-subtle); display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.comparison-flow span { padding: 5px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: #354153; font-size: 10px; font-weight: 700; }
.comparison-flow i { width: 13px; height: 13px; color: var(--muted); }
.product-comparison-table { min-width: 1200px; }
.product-comparison-table td { vertical-align: top; }
.product-comparison-mobile { display: none; }
.mobile-data-list { display: none; }
.mobile-data-card { padding: 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.mobile-data-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.mobile-data-card header > div { min-width: 0; }
.mobile-data-card header strong, .mobile-data-card header small { display: block; overflow-wrap: anywhere; }
.mobile-data-card header small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.mobile-data-card p { margin: 10px 0; color: #4c5664; font-size: 11px; line-height: 1.55; }
.mobile-data-card footer { display: flex; gap: 8px; flex-wrap: wrap; }
.mobile-data-card footer .primary-button, .mobile-data-card footer .secondary-button { flex: 1 1 125px; justify-content: center; }
.mobile-data-metrics { margin-bottom: 11px; display: flex; gap: 8px; flex-wrap: wrap; }
.mobile-data-metrics > span { min-width: 0; padding: 5px 7px; border: 1px solid var(--line); border-radius: 4px; font-size: 10px; }
.product-comparison-card { padding: 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.product-comparison-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.product-comparison-card header > div { min-width: 0; }
.product-comparison-card header strong, .product-comparison-card header small, .product-comparison-card > small { display: block; overflow-wrap: anywhere; }
.product-comparison-card header small, .product-comparison-card > small { margin-top: 4px; font-size: 10px; line-height: 1.45; }
.product-comparison-card h4 { margin: 12px 0 5px; font-size: 13px; line-height: 1.45; }
.product-comparison-card p { margin: 0 0 10px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.product-comparison-card footer { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.product-comparison-meta { margin-top: 9px; display: flex; gap: 6px; flex-wrap: wrap; }
.product-comparison-meta span, .product-comparison-meta .profile-shortcut { padding: 3px 6px; border-radius: 3px; font-size: 9px; font-weight: 700; }
.product-comparison-meta span { background: var(--surface-subtle); color: var(--muted); }
.product-comparison-meta .profile-shortcut { min-height: 22px; margin-top: 0; }
.positive-text { color: var(--green); }
.source-manage-list { display: grid; }
.source-manage-row { min-width: 0; padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: start; }
.source-manage-row:last-child { border-bottom: 0; }
.source-manage-row span, .source-manage-row strong, .source-manage-row small, .source-manage-row a { min-width: 0; display: block; overflow-wrap: anywhere; }
.source-manage-row small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.source-manage-row a { margin-top: 5px; color: var(--blue); font-size: 10px; }
.dialog:has(.comparison-report-head) { width: min(920px,100%); }
.comparison-scores { grid-template-columns: repeat(3,minmax(0,1fr)); }
.comparison-result-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 22px; }
.comparison-list ul { margin: 0; padding-left: 18px; }
.comparison-list li { margin: 7px 0; color: #445063; font-size: 12px; line-height: 1.6; }
.comparison-list.positive { border-top: 3px solid var(--green); }
.comparison-list.warning { border-top: 3px solid var(--amber); }
.comparison-list.danger { border-top: 3px solid var(--red); }
.evidence-source-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.evidence-source { min-width: 0; padding: 10px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.evidence-source:hover { border-color: #8aaee5; background: var(--blue-soft); }
.evidence-source strong, .evidence-source small { display: block; overflow-wrap: anywhere; }
.evidence-source small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }

@media (max-width: 700px) {
  .analysis-table-header { flex-direction: column; align-items: stretch; }
  .analysis-table-header .section-actions { width: 100%; justify-content: space-between; }
  .analysis-table-header .segmented { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; }
  .analysis-table-header .segmented button { flex: 0 0 auto; }
  .overview-alert-grid { grid-template-columns: 1fr; }
  .overview-alert-heading { border-right: 0; }
  .mailbox-alert-list { grid-template-columns: 1fr; }
  .mailbox-alert-list .email-alert-summary:nth-child(odd) { border-right: 0; }
  .email-alert-summary { grid-template-columns: 36px minmax(0,1fr) 18px; align-items: start; }
  .email-alert-summary-counts { grid-column: 1 / -1; grid-row: 2; justify-content: flex-end; border-left: 0; border-top: 1px solid var(--line); padding-top: 8px; }
  .email-alert-summary-counts b { flex: 1; min-width: 0; }
  .email-alert-detail { grid-template-columns: 72px minmax(0,1fr) 16px; gap: 8px; }
  .email-alert-wait { grid-column: 2; text-align: left; }
  .email-alert-detail > i { grid-column: 3; grid-row: 1; }
  .email-analysis-grid { grid-template-columns: 1fr; }
  .email-analysis-grid > div, .email-analysis-grid > div:nth-child(even), .email-analysis-grid > div:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .email-analysis-grid > div:last-child { border-bottom: 0; }
  .email-message.inbound, .email-message.outbound { margin-left: 0; margin-right: 0; }
  .customer-mailbox-group > summary { grid-template-columns: 34px minmax(0,1fr) 16px; align-items: start; }
  .customer-mailbox-counts { grid-column: 2; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; }
  .customer-mailbox-group > summary > i { grid-column: 3; grid-row: 1; }
  .mailbox-category-toolbar { padding: 8px 8px 0; grid-template-columns: 1fr; }
  .mailbox-category-toolbar .mail-category-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mailbox-category-toolbar .mail-category-chip { min-width: 0; }
  .mailbox-category-toolbar .primary-button { width: 100%; justify-content: center; }
  .email-ai-status { margin: 8px 8px 0; }
  .customer-category-list { padding: 8px; }
  .customer-profile-row { grid-template-columns: minmax(0,1fr) auto; gap: 9px; align-items: start; }
  .customer-profile-intent, .customer-profile-next { grid-column: 1 / -1; }
  .customer-profile-activity { grid-column: 2; grid-row: 1; }
  .customer-profile-row > i { display: none; }
  .product-improvement-row { grid-template-columns: 1fr; }
  .product-improvement-action .primary-button { width: 100%; justify-content: center; }
  .sourcing-hierarchy-group > summary { align-items: flex-start; }
  .sourcing-hierarchy-group > summary > b { margin-left: auto; }
  .shipping-quote-summary { min-width: 0; }
  .shipping-quote-line { grid-template-columns: minmax(0,1fr) auto; }
  .organization-departments { grid-template-columns: 1fr; padding: 8px; }
  .organization-team { margin: 8px; }
  .organization-person { grid-template-columns: 34px minmax(0,1fr) auto; }
  .organization-person-meta { grid-column: 2 / -1; text-align: left; }
  .organization-overview-grid { grid-template-columns: 1fr; padding: 8px; }
  .dashboard-product-comparison .section-header { align-items: flex-start; flex-direction: column; }
  .dashboard-product-comparison .section-actions { width: 100%; justify-content: space-between; }
  .dashboard-comparison-row { grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: start; }
  .dashboard-comparison-state, .dashboard-comparison-result { grid-column: 1; }
  .dashboard-comparison-open { grid-column: 2; grid-row: 1; }
  .comparison-result-grid, .evidence-source-list { grid-template-columns: 1fr; }
  .comparison-flow { align-items: flex-start; }
  .comparison-flow i { transform: rotate(90deg); }
  .product-comparison-desktop { display: none; }
  .product-comparison-mobile { display: block; }
  .desktop-data-table { display: none; }
  .mobile-data-list { display: block; }
  .monitor-actions { align-items: stretch; }
  .monitor-actions .segmented { width: 100%; overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; }
  .monitor-actions .segmented button { flex: 0 0 auto; }
  .monitor-actions .filters { width: 100%; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .monitor-actions .filters button { min-width: 0; justify-content: center; }
  .account-nature-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .account-nature-summary > div { border-bottom: 1px solid var(--line); }
  .account-nature-summary > div:first-child { grid-column: 1 / -1; border-right: 0; }
  .account-nature-summary > div:nth-child(odd) { border-right: 0; }
  .account-nature-summary > div:nth-last-child(-n+2) { border-bottom: 0; }
  .account-platform-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); overflow: visible; }
  .account-platform-summary > div { min-width: 0; border-right: 1px solid var(--line); }
  .account-platform-summary > .account-summary-title { grid-column: 1 / -1; }
  .account-platform-summary > .account-summary-cell:nth-child(odd) { border-right: 0; }
  .account-platform-summary > .account-summary-cell { border-bottom: 1px solid var(--line); }
  .monitor-hierarchy { padding: 8px; }
  .monitor-owner-group > summary, .monitor-platform-group > summary, .monitor-store-group > summary { align-items: flex-start; padding: 10px; }
  .monitor-platform-list, .monitor-store-list { padding: 0 7px 8px; }
  .store-profile-hierarchy { padding: 8px; }
  .store-profile-card { grid-template-columns: minmax(0,1fr) auto; gap: 10px; padding: 12px; }
  .store-profile-metrics { grid-column: 1 / -1; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .store-profile-card > .row-actions { grid-column: 2; grid-row: 1; align-self: start; }
  .monitor-level-summary { max-width: 48%; }
  .monitor-level-summary > span { display: none; }
  .monitor-owner-summary-actions { width: 100%; padding-left: 0; }
  .monitor-owner-summary-actions .monitor-level-summary { width: auto; }
  .account-scope-result { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .account-scope-result > div { grid-column: 1 / -1; }
  .account-scope-action-bar, .account-scope-actions { justify-content: stretch; }
  .account-scope-actions { width: 100%; }
  .account-scope-actions > button { flex: 1 1 132px; }
  .monitor-leaf-row { grid-template-columns: minmax(0,1fr); gap: 11px; padding: 12px; }
  .monitor-leaf-row.risk { padding-left: 9px; }
  .monitor-leaf-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .monitor-leaf-actions { justify-content: flex-start; }
  .metrics-grid.compact-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .section-header { align-items: flex-start; }
  .dialog { max-height: calc(100dvh - 20px); }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid > .full { grid-column: auto; }
  .task-delegation > .inline-header { align-items: stretch; flex-direction: column; }
  .task-delegation > .inline-header .primary-button { width: 100%; justify-content: center; }
  .task-child-item { grid-template-columns: minmax(0,1fr) 16px; gap: 8px; }
  .task-child-progress { grid-column: 1; grid-template-columns: minmax(0,1fr) 34px; }
  .task-child-item > i { grid-column: 2; grid-row: 1; }
  .task-progress-presets { grid-template-columns: repeat(5,minmax(42px,1fr)); overflow-x: auto; }
  .inquiry-row { padding-inline: 10px; }
}

@media (max-width: 420px) {
  .metrics-grid.compact-metrics { grid-template-columns: 1fr; }
  .monitor-actions .filters { grid-template-columns: 1fr; }
}

.monitor-leaf-analysis.analysis-run-error strong,
.monitor-leaf-analysis.analysis-run-error p { color: var(--danger); }
.monitor-leaf-analysis.analysis-run-error { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); background: color-mix(in srgb, var(--danger) 5%, var(--surface)); }
.connection-health-alert.danger { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); }
.connection-alert-dialog { display: grid; gap: 8px; }
.connection-alert-detail { width: 100%; display: grid; grid-template-columns: 28px minmax(0,1fr) 18px; gap: 10px; align-items: start; padding: 12px; border: 1px solid color-mix(in srgb, var(--danger) 42%, var(--line)); background: color-mix(in srgb, var(--danger) 5%, var(--surface)); text-align: left; }
.connection-alert-detail > i:first-child, .connection-alert-detail p { color: var(--danger); }
.connection-alert-detail span { display: grid; gap: 4px; min-width: 0; }
.connection-alert-detail p { margin: 0; overflow-wrap: anywhere; }
.connection-alert-detail small { color: var(--muted); }
.cross-department-team { border-left: 3px solid var(--warning); }
.task-recipient-picker { max-height: 48vh; overflow: hidden; display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; }
.task-recipient-scopes { display: flex; flex-wrap: wrap; gap: 7px; }
.task-recipient-departments { min-height: 0; overflow-y: auto; display: grid; gap: 10px; padding-right: 4px; }
.task-recipient-department { border: 1px solid var(--line); background: var(--surface); }
.task-recipient-department > header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.task-recipient-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; background: var(--line); }
.task-recipient-option { display: grid; grid-template-columns: 18px 32px minmax(0,1fr); align-items: center; gap: 8px; padding: 9px; background: var(--surface); cursor: pointer; }
.task-recipient-option input { width: 16px; height: 16px; }
.task-recipient-option .avatar { width: 30px; height: 30px; }
.task-recipient-option > span:last-child { display: grid; min-width: 0; }
.task-recipient-option small { color: var(--muted); }

/* v7: multi-company personnel, work calendar, presenters and finance workbench */
.assignment-badge, .employment-badge { display: inline-flex; margin-left: 5px; padding: 2px 5px; border-radius: 3px; font-size: 9px; font-weight: 800; vertical-align: middle; }
.assignment-badge { background: var(--amber-soft); color: #8a5300; }
.employment-badge { margin: 5px 0 0; background: #fce8e8; color: var(--danger); }
.probation-badge, .formal-badge { display: inline-flex; width: fit-content; margin-top: 5px; padding: 2px 5px; border-radius: 3px; font-size: 9px; font-weight: 800; }
.probation-badge { background: #fff0d6; color: #8a5300; }
.formal-badge { background: #e4f4eb; color: #176b42; }
.probation-alert-section { border-left: 3px solid #d97706; }
.probation-alert-list { display: grid; }
.probation-alert-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 18px; border-top: 1px solid var(--line); }
.probation-alert-row:first-child { border-top: 0; }
.probation-alert-row > div:first-child { min-width: 0; }
.probation-alert-row strong, .probation-alert-row small { display: block; }
.probation-alert-row small { margin-top: 3px; color: var(--muted); }
.probation-alert-row p { margin: 6px 0 0; font-size: 12px; }
.warning-text { color: #9a5d00; }
@media (max-width: 720px) {
  .probation-alert-row { align-items: flex-start; flex-direction: column; }
  .probation-alert-row .section-actions { width: 100%; }
  .probation-alert-row .section-actions button { flex: 1; }
}

.daily-report-toolbar { align-items: flex-end; gap: 12px; }
.daily-report-toolbar .filters { flex-wrap: wrap; }
.daily-report-toolbar label:not(.search-field) { display: grid; gap: 4px; color: var(--muted); font-size: 10px; font-weight: 700; }
.daily-report-toolbar input[type="date"] { min-width: 140px; }
.daily-report-policy-band { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 13px 16px; border: 1px solid #aac0dd; border-left: 4px solid var(--blue); background: #f4f8fd; }
.daily-report-policy-band > i { width: 21px; height: 21px; color: var(--blue); }
.daily-report-policy-band strong, .daily-report-policy-band p { display: block; margin: 0; }
.daily-report-policy-band p { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.daily-report-policy-band > span { padding: 6px 9px; border: 1px solid #cbd7e6; background: var(--surface); color: #335b89; font-size: 10px; font-weight: 800; white-space: nowrap; }
.daily-report-overview-fold > summary { list-style: none; min-height: 58px; padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; }
.daily-report-overview-fold > summary::-webkit-details-marker { display: none; }
.daily-report-overview-fold > summary > span:first-child { min-width: 0; display: flex; align-items: center; gap: 9px; }
.daily-report-overview-fold > summary > span:first-child strong, .daily-report-overview-fold > summary > span:first-child small { display: block; }
.daily-report-overview-fold > summary > span:first-child small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.daily-report-overview-fold > summary i { width: 18px; height: 18px; flex: 0 0 auto; }
.daily-report-overview-fold[open] > summary > i:last-child { transform: rotate(90deg); }
.daily-report-summary-actions { margin-left: auto; min-width: 0; display: flex; align-items: center; gap: 10px; }
.daily-report-overview-fold[open] > summary > .daily-report-summary-actions > i:last-child { transform: rotate(90deg); }
.daily-report-mode-summary { max-width: min(520px,42vw); min-height: 38px; padding: 5px 10px; border: 1px solid var(--line); background: var(--surface-muted); color: var(--text); display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 8px; text-align: left; cursor: pointer; }
.daily-report-mode-summary:hover { border-color: var(--blue); background: #f4f8ff; }
.daily-report-mode-summary.has-exempt { border-color: #e3b455; background: #fff9ec; }
.daily-report-mode-summary b { white-space: nowrap; font-size: 12px; }
.daily-report-mode-summary small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.daily-report-mode-manager { display: grid; gap: 14px; }
.daily-report-mode-list { display: grid; gap: 8px; max-height: min(68vh,720px); overflow: auto; padding-right: 4px; }
.daily-report-mode-person { display: grid; grid-template-columns: minmax(260px,1fr) minmax(150px,220px) auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); background: var(--surface); }
.daily-report-mode-person.is-exempt { border-left: 4px solid var(--amber); background: #fffaf1; }
.daily-report-mode-person > div { min-width: 0; display: grid; gap: 3px; }
.daily-report-mode-person > div small { color: var(--muted); }
.livestream-plan-sync-controls { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.livestream-plan-sync-controls > span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.livestream-monitor-state { font-weight: 700; }
.livestream-monitor-state.status-completed { color: var(--green); }
.livestream-monitor-state.status-running, .livestream-monitor-state.status-queued { color: var(--blue); }
.livestream-monitor-state.status-error { color: var(--red); }
.livestream-live-phase { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 3px 7px; border: 1px solid var(--line); background: var(--surface-muted); color: var(--muted); font-size: 11px; font-weight: 700; }
.livestream-live-phase i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.livestream-live-phase.phase-warming { border-color: #e3b455; background: #fff9ec; color: #9a5b00; }
.livestream-live-phase.phase-live { border-color: #e2a2a2; background: var(--red-soft); color: var(--red); }
.livestream-live-phase.phase-live i { animation: livestreamPulse 1.2s ease-in-out infinite; }
.livestream-live-phase.phase-recovering { border-color: #9fc0ef; background: var(--blue-soft); color: var(--blue); }
@keyframes livestreamPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.65); } }
.daily-report-overview-fold .daily-report-metrics, .daily-report-overview-fold .daily-report-ai-body { border-top: 1px solid var(--line); }
.daily-report-ai-card { border-left: 4px solid var(--blue); }
.daily-report-ai-card > summary > span:first-child > i { color: var(--blue); }
.daily-report-ai-body { padding: 16px 18px 20px; }
.daily-report-ai-body > strong { display: block; font-size: 17px; }
.daily-report-ai-body > p { margin: 7px 0 16px; color: var(--muted); line-height: 1.65; }
.daily-report-ai-body .analysis-columns b { display: block; margin-bottom: 7px; }
.daily-report-employee-overview { border-left: 4px solid #4e77b8; }
.daily-report-employee-overview > .section-header { align-items: center; }
.daily-report-employee-overview-body { display: grid; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.daily-report-employee-company, .daily-report-employee-department, .daily-report-employee-card { background: var(--surface); }
.daily-report-employee-company > summary, .daily-report-employee-department > summary, .daily-report-employee-card > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.daily-report-employee-company > summary::-webkit-details-marker, .daily-report-employee-department > summary::-webkit-details-marker, .daily-report-employee-card > summary::-webkit-details-marker { display: none; }
.daily-report-employee-company > summary { min-height: 50px; padding: 10px 16px; background: #f4f7fb; }
.daily-report-employee-department > summary { min-height: 44px; padding: 8px 28px; background: #fafbfd; }
.daily-report-employee-company > summary > span, .daily-report-employee-department > summary > span { display: flex; align-items: center; gap: 8px; }
.daily-report-employee-company summary small, .daily-report-employee-department summary small { color: var(--muted); font-size: 10px; }
.daily-report-employee-company summary i, .daily-report-employee-department summary i, .daily-report-employee-card summary > i { width: 17px; height: 17px; flex: 0 0 auto; }
.daily-report-company-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.daily-report-company-actions button { flex: 0 0 auto; }
.daily-report-employee-company[open] > summary > i:last-child, .daily-report-employee-department[open] > summary > i:last-child, .daily-report-employee-card[open] > summary > i:last-child { transform: rotate(90deg); }
.daily-report-employee-cards { display: grid; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.daily-report-employee-card > summary { min-height: 58px; padding: 10px 16px 10px 44px; }
.daily-report-employee-card > summary:hover { background: #f7faff; }
.daily-report-employee-select { min-width: 0; display: grid; grid-template-columns: auto minmax(100px,1fr); column-gap: 9px; align-items: center; }
.daily-report-employee-select input { grid-row: span 2; }
.daily-report-employee-select strong, .daily-report-employee-select small { display: block; min-width: 0; overflow-wrap: anywhere; }
.daily-report-employee-select small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.daily-report-employee-stat { display: grid; justify-items: end; gap: 3px; white-space: nowrap; }
.daily-report-employee-stat small { color: var(--muted); font-size: 10px; }
.daily-report-employee-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-left: auto; }
.daily-report-employee-actions .secondary-button { white-space: nowrap; }
.daily-report-exempt-date-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-top: 8px; max-height: 280px; overflow: auto; padding: 8px; border: 1px solid var(--line); background: var(--surface-subtle); }
.daily-report-exempt-date { min-height: 46px; align-items: flex-start; }
.daily-report-exempt-date.is-exempt { border-color: #9fc5aa; background: #f2fbf4; }
.daily-report-exempt-date small { display: block; color: var(--muted); margin-top: 2px; }
.daily-report-employee-card-body { padding: 0 16px 14px 72px; border-top: 1px solid var(--line); }
.daily-report-period-summary { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 12px 0; color: var(--muted); font-size: 11px; }
.daily-report-period-summary b { color: var(--text); }
.daily-report-personal-analysis-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0 4px; border-bottom: 1px solid var(--line); }
.daily-report-personal-analysis { margin: 10px 0 2px; padding: 12px 14px; border: 1px solid #c9d8ee; border-left: 3px solid var(--blue); background: #f7faff; }
.daily-report-personal-analysis-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.daily-report-personal-analysis-head strong { margin-right: auto; }
.daily-report-personal-analysis > strong { display: block; }
.daily-report-personal-analysis > p { margin: 6px 0 10px; color: var(--muted); line-height: 1.55; }
.daily-report-personal-analysis .analysis-columns { margin-top: 8px; }
.daily-report-period-timeline { display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: 6px; }
.daily-report-period-day { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; padding: 8px 10px; border: 1px solid var(--line); border-left: 3px solid #aeb8c5; background: var(--surface-subtle); }
.daily-report-period-day.tone-success { border-left-color: var(--green); }
.daily-report-period-day.tone-info { border-left-color: var(--blue); background: #f6f9ff; }
.daily-report-period-day.tone-warning { border-left-color: var(--amber); background: #fffaf1; }
.daily-report-period-day.tone-danger { border-left-color: var(--red); background: #fff8f8; }
.daily-report-period-day.tone-history { border-left-color: #7188a4; background: #f5f7fa; }
.daily-report-period-day time { color: var(--muted); font-size: 10px; }
.daily-report-period-day strong, .daily-report-period-day small { grid-column: 1 / -1; overflow-wrap: anywhere; }
.daily-report-period-day strong { font-size: 11px; line-height: 1.45; }
.daily-report-period-day small { color: var(--muted); font-size: 10px; }
.daily-report-metric-button { width: 100%; text-align: left; cursor: pointer; font: inherit; }
.daily-report-metric-button:hover, .metric-button:hover { border-color: var(--blue); background: #f5f9ff; }
.dialog:has(.daily-report-metric-detail) { width: min(980px,100%); }
.daily-report-metric-detail > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin: -4px 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.daily-report-metric-detail > header strong, .daily-report-metric-detail > header small { display: block; }
.daily-report-metric-detail > header small { margin-top: 4px; color: var(--muted); }
.daily-report-metric-detail > header p { max-width: 460px; margin: 0; color: var(--muted); line-height: 1.5; text-align: right; }
.daily-report-metric-person-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.daily-report-metric-person { min-width: 0; display: grid; grid-template-columns: minmax(130px,.7fr) minmax(120px,.65fr) minmax(230px,1.5fr) minmax(220px,1fr); gap: 14px; align-items: start; padding: 12px 14px; border-left: 4px solid #aeb8c5; background: var(--surface); }
.daily-report-metric-person.tone-success { border-left-color: var(--green); }
.daily-report-metric-person.tone-info { border-left-color: var(--blue); background: #f6f9ff; }
.daily-report-metric-person.tone-warning { border-left-color: var(--amber); background: #fffaf1; }
.daily-report-metric-person.tone-danger { border-left-color: var(--red); background: #fff8f8; }
.daily-report-metric-name strong, .daily-report-metric-name small, .daily-report-metric-context strong, .daily-report-metric-context small, .daily-report-metric-company span, .daily-report-metric-company small { display: block; min-width: 0; overflow-wrap: anywhere; }
.daily-report-metric-name small, .daily-report-metric-context small, .daily-report-metric-company small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.daily-report-metric-status { display: grid; justify-items: start; gap: 5px; }
.daily-report-metric-company span { margin-top: 4px; font-size: 11px; line-height: 1.5; }
.metric-button { width: 100%; text-align: left; cursor: pointer; font: inherit; }
.leave-request-section-label { padding: 10px 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-subtle); color: var(--muted); font-size: 11px; font-weight: 800; }
.leave-request-synced { border-left-color: var(--blue); background: #f5f9ff; }
.daily-report-hierarchy { background: var(--line); display: grid; gap: 1px; }
.daily-report-date, .daily-report-company, .daily-report-department { background: var(--surface); }
.daily-report-date > summary, .daily-report-company > summary, .daily-report-department > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.daily-report-date > summary::-webkit-details-marker, .daily-report-company > summary::-webkit-details-marker, .daily-report-department > summary::-webkit-details-marker { display: none; }
.daily-report-date > summary { min-height: 58px; padding: 10px 16px; background: #f4f7fb; }
.daily-report-company > summary { min-height: 52px; padding: 9px 18px 9px 30px; border-top: 1px solid var(--line); background: #fafbfd; }
.daily-report-department > summary { min-height: 46px; padding: 8px 18px 8px 46px; border-top: 1px solid var(--line); }
.daily-report-date summary > span { min-width: 0; display: flex; align-items: center; gap: 9px; }
.daily-report-date summary strong, .daily-report-date summary small { display: block; }
.daily-report-date summary small { color: var(--muted); font-size: 10px; }
.daily-report-date summary i { width: 17px; height: 17px; }
.daily-report-date[open] > summary > i:last-child, .daily-report-company[open] > summary > i:last-child, .daily-report-department[open] > summary > i:last-child { transform: rotate(90deg); }
.daily-report-person-list { border-top: 1px solid var(--line); }
.daily-report-row { min-width: 0; padding: 12px 16px 12px 60px; display: grid; grid-template-columns: minmax(150px,.85fr) 135px minmax(250px,2fr) minmax(200px,1.15fr); gap: 16px; align-items: start; border-bottom: 1px solid var(--line); border-left: 4px solid #aeb8c5; background: var(--surface); }
.daily-report-row:last-child { border-bottom: 0; }
.daily-report-row.tone-success { border-left-color: var(--green); }
.daily-report-row.tone-info { border-left-color: var(--blue); background: #f6f9ff; }
.daily-report-row.tone-warning { border-left-color: var(--amber); background: #fffaf1; }
.daily-report-row.tone-danger { border-left-color: var(--red); background: #fff8f8; }
.daily-report-row.tone-history { border-left-color: #7188a4; background: #f5f7fa; }
.daily-report-date.historical > summary { background: #edf2f7; color: #3f5874; }
.daily-report-row.daily-report-streak { box-shadow: inset 5px 0 0 rgba(192,39,45,.12); }
.daily-report-person strong, .daily-report-person small, .daily-report-content strong, .daily-report-content small, .daily-report-reminder span, .daily-report-reminder small { display: block; min-width: 0; }
.daily-report-person small, .daily-report-content small, .daily-report-reminder small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.daily-report-content strong { font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.daily-report-status { display: grid; justify-items: start; gap: 7px; }
.daily-report-status b { font-size: 10px; }
.daily-report-reminder span { display: flex; gap: 6px; align-items: flex-start; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.daily-report-reminder span i { flex: 0 0 auto; width: 15px; height: 15px; }
.status-tag.status-success { border-color: #8fc5a3; background: #edf8f1; color: #176c3c; }
.status-tag.status-info { border-color: #93b6ee; background: #eef4ff; color: var(--blue); }
.status-tag.status-warning { border-color: #d7ae72; background: #fff6e7; color: #8a5300; }
.status-tag.status-danger { border-color: #e2a0a3; background: #fff0f0; color: var(--red); }
.status-tag.status-muted { border-color: var(--line); background: var(--surface-subtle); color: var(--muted); }
.status-tag.status-history { border-color: #9aacc0; background: #eaf0f6; color: #3f5874; }

@media (max-width: 980px) {
  .daily-report-row { padding-left: 28px; grid-template-columns: minmax(140px,.8fr) 120px minmax(220px,1.7fr); }
  .daily-report-reminder { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .daily-report-policy-band { grid-template-columns: auto minmax(0,1fr); align-items: start; }
  .daily-report-policy-band > span { grid-column: 2; justify-self: start; }
  .daily-report-overview-fold > summary { align-items: flex-start; padding: 10px 12px; }
  .daily-report-overview-fold > summary > span:first-child { align-items: flex-start; flex-wrap: wrap; }
  .daily-report-overview-fold > summary > span:first-child small { flex-basis: 100%; padding-left: 27px; }
  .daily-report-summary-actions { width: 100%; margin-left: 27px; }
  .daily-report-mode-summary { max-width: calc(100% - 28px); flex: 1; }
  .daily-report-mode-person { grid-template-columns: 1fr; align-items: stretch; }
  .livestream-plan-sync-controls { align-items: stretch; flex-direction: column; }
  .daily-report-ai-card > summary .analysis-badge { margin-left: auto; }
  .daily-report-toolbar { align-items: stretch; }
  .daily-report-toolbar .filters, .daily-report-toolbar .section-actions { width: 100%; }
  .daily-report-toolbar label:not(.search-field), .daily-report-toolbar input[type="date"], .daily-report-toolbar .search-field { width: 100%; }
  .daily-report-date > summary { padding: 10px 12px; }
  .daily-report-company > summary { padding-left: 20px; }
  .daily-report-department > summary { padding-left: 28px; }
  .daily-report-row { padding: 12px 14px 12px 20px; grid-template-columns: 1fr; gap: 10px; }
  .daily-report-reminder { grid-column: auto; }
  .daily-report-employee-overview > .section-header { align-items: stretch; }
  .daily-report-employee-overview > .section-header .section-actions, .daily-report-employee-overview > .section-header .primary-button { width: 100%; }
  .daily-report-employee-company, .daily-report-employee-department, .daily-report-employee-cards, .daily-report-employee-card { min-width: 0; max-width: 100%; }
  .daily-report-employee-company > summary { padding: 10px 12px; flex-wrap: wrap; }
  .daily-report-employee-company > summary > span, .daily-report-employee-department > summary > span { min-width: 0; }
  .daily-report-employee-company > summary strong, .daily-report-employee-department > summary strong { overflow-wrap: anywhere; }
  .daily-report-company-actions { width: 100%; align-items: flex-start; justify-content: flex-start; flex-wrap: wrap; margin-left: 0; }
  .daily-report-employee-department > summary { padding-left: 20px; }
  .daily-report-employee-card > summary { padding: 10px 12px 10px 20px; align-items: flex-start; }
  .daily-report-employee-select { grid-template-columns: auto minmax(0,1fr); }
  .daily-report-employee-stat { text-align: right; white-space: normal; }
  .daily-report-employee-actions { width: 100%; justify-content: flex-start; margin-left: 0; order: 3; }
  .daily-report-employee-card-body { padding: 0 12px 12px 32px; }
  .daily-report-metric-detail > header { display: grid; gap: 8px; }
  .daily-report-metric-detail > header p { text-align: left; }
  .daily-report-metric-person { grid-template-columns: 1fr; gap: 8px; }
}
.department-assignments-block > p, .presenter-assignment > p { margin: 0 0 10px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.department-assignment-row { margin-bottom: 10px; padding: 12px; border: 1px solid var(--line); background: var(--surface-subtle); }
.department-assignment-row > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.department-assignment-row > header strong { font-size: 12px; }
.department-assignment-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.assignment-jobs { margin-top: 10px; }
.calendar-company-list { display: grid; gap: 10px; margin-bottom: 18px; }
.calendar-company { border: 1px solid var(--line); background: var(--surface); }
.calendar-company > summary { min-height: 48px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.calendar-company > summary span { display: flex; align-items: center; gap: 8px; }
.calendar-company > summary i { width: 16px; height: 16px; color: var(--blue); }
.calendar-company > summary small { color: var(--muted); text-align: right; }
.calendar-company-body { padding: 12px; border-top: 1px solid var(--line); }
.calendar-weekdays { margin-bottom: 10px; display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 6px; }
.calendar-period-list { margin-top: 12px; border-top: 1px solid var(--line); }
.calendar-period-list > div { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.calendar-period-list span, .calendar-period-list strong, .calendar-period-list small { display: block; }
.calendar-period-list small { margin-top: 3px; color: var(--muted); }
.presenter-choice-list { display: grid; gap: 8px; }
.presenter-choice { padding: 12px; border: 1px solid var(--line); display: grid; gap: 12px; background: var(--surface); opacity: .72; }
.presenter-choice.selected { opacity: 1; border-color: #9bb9e8; box-shadow: inset 0 0 0 1px #d6e4fa; }
.presenter-choice.temporary { border-left: 3px solid var(--amber); }
.presenter-choice-main { display: grid; grid-template-columns: minmax(0,1fr) auto 34px; gap: 10px; align-items: center; }
.presenter-choice .check-line { align-self: center; }
.presenter-type-badge { padding: 4px 7px; border: 1px solid var(--line); font-size: 10px; color: var(--muted); background: var(--surface-subtle); }
.presenter-type-badge.temporary { border-color: #e6b76b; color: #8d5200; background: #fff7e8; }
.presenter-inputs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; align-items: end; }
.presenter-pay-note { min-height: 52px; padding: 8px 10px; display: grid; align-content: center; gap: 3px; color: var(--muted); font-size: 10px; background: var(--surface-subtle); }
.presenter-pay-note strong { color: var(--ink); font-size: 11px; }
.presenter-cost { min-height: 52px; padding: 8px 10px; display: grid; align-content: center; gap: 3px; background: #f2f8f4; border-left: 3px solid var(--green); }
.presenter-cost span { color: var(--muted); font-size: 10px; }
.presenter-cost strong { color: #187445; font-size: 16px; }
.manual-presenter-block { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.manual-presenter-block .inline-header { margin-bottom: 8px; }
.manual-presenter-block .inline-header small { display: block; margin-top: 3px; color: var(--muted); }
#manual-presenter-list { display: grid; gap: 8px; }
.manual-presenter-row { display: grid; grid-template-columns: minmax(180px,1fr) auto 34px; gap: 10px; align-items: end; }
.manual-presenter-row > span { align-self: center; color: var(--muted); font-size: 10px; }
.leave-request-list { max-height: 280px; margin: 12px 0 18px; overflow-y: auto; border: 1px solid var(--line); }
.leave-request-row { min-height: 76px; padding: 11px 12px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); }
.leave-request-row:last-child { border-bottom: 0; }
.leave-request-row p, .leave-request-row small { margin: 3px 0 0; color: var(--muted); }
.leave-request-actions { display: flex; gap: 7px; align-items: center; }
.leave-status { padding: 4px 7px; border: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.leave-status.approved { color: #187445; border-color: #98d1b3; background: #f2f8f4; }
.leave-status.pending { color: #8d5200; border-color: #e6b76b; background: #fff7e8; }
.leave-status.rejected, .leave-status.cancelled { color: var(--red); border-color: #e4acac; background: #fff5f5; }
.finance-permission-note { margin-bottom: 12px; border-left: 4px solid var(--amber); }
.finance-workspace-actions { gap: 8px; flex-wrap: wrap; }
.finance-action-panel { overflow: hidden; }
.finance-action-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.finance-action-grid > button { min-width: 0; min-height: 76px; padding: 13px 15px; border: 0; background: var(--surface); color: var(--ink); display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: center; gap: 10px; text-align: left; cursor: pointer; }
.finance-action-grid > button:hover { background: var(--surface-subtle); }
.finance-action-grid > button.primary { background: var(--blue); color: white; }
.finance-action-grid > button.primary:hover { background: #1459ba; }
.finance-action-grid > button:disabled { opacity: .6; cursor: wait; }
.finance-action-grid > button > i { width: 20px; height: 20px; color: var(--blue); }
.finance-action-grid > button.primary > i { color: white; }
.finance-action-grid strong, .finance-action-grid small { display: block; min-width: 0; }
.finance-action-grid small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.finance-action-grid > button.primary small { color: rgba(255,255,255,.78); }
.finance-record-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.finance-record-grid > div, .finance-record-grid > section { min-width: 0; padding: 14px; }
.finance-record-grid > div + div, .finance-record-grid > section + section { border-left: 1px solid var(--line); }
.finance-record-grid h3 { margin: 0 0 10px; font-size: 13px; }
.finance-record-column > header { min-height: 40px; margin-bottom: 2px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.finance-record-column > header h3 { margin: 0; }
.finance-record-column > header small { color: var(--muted); font-size: 10px; }
.finance-record { min-width: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.finance-record-main { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: start; }
.finance-record-meta { margin-top: 7px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.finance-record-meta span + span::before { content: '·'; margin-right: 8px; }
.finance-record span, .finance-record strong, .finance-record small { min-width: 0; display: block; overflow-wrap: anywhere; }
.finance-record small { color: var(--muted); font-size: 10px; }
.finance-record b { color: var(--blue); }
.finance-record-files { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 6px; }
.finance-record-files a { max-width: 100%; min-height: 30px; padding: 5px 8px; border: 1px solid var(--line); background: var(--surface-subtle); color: var(--ink); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 10px; }
.finance-record-files a:hover { border-color: var(--blue); color: var(--blue); }
.finance-record-files a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finance-record-files i { flex: 0 0 auto; width: 14px; height: 14px; }
.finance-no-files { margin-top: 8px; color: var(--muted); }
.data-table tfoot th { background: var(--surface-subtle); border-top: 2px solid var(--line); }
.section-collapse-toggle { flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface); }
.section-collapse-toggle i { transition: transform .16s ease; }
.section-collapse-toggle[aria-expanded="true"] i { transform: rotate(90deg); }
.section-collapse-body { min-width: 0; }
.section-collapse-body > .data-table-wrap:first-child,
.section-collapse-body > .section-body:first-child { border-top: 0; }

@media (max-width: 720px) {
  .task-recipient-picker { max-height: 56vh; }
  .task-recipient-list { grid-template-columns: 1fr; }
  .connection-alert-detail { grid-template-columns: 24px minmax(0,1fr) 16px; }
  .department-assignment-fields, .finance-record-grid, .finance-action-grid { grid-template-columns: 1fr; }
  .finance-record-grid > div + div, .finance-record-grid > section + section { border-left: 0; border-top: 1px solid var(--line); }
  .calendar-weekdays { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .calendar-company > summary { align-items: flex-start; flex-direction: column; }
  .calendar-company > summary small { text-align: left; }
  .presenter-choice-main, .presenter-inputs, .manual-presenter-row, .leave-request-row { grid-template-columns: 1fr; align-items: stretch; }
  .presenter-choice-main { grid-template-columns: minmax(0,1fr) auto 34px; }
  .leave-request-actions { justify-content: flex-start; flex-wrap: wrap; }
  .finance-workspace-actions > button { flex: 1 1 145px; justify-content: center; }
}

@media (max-width: 700px) {
  .data-table-wrap.mobile-stack-enabled { overflow: visible; border: 0; background: transparent; }
  .responsive-stack-table { display: block; min-width: 0; background: transparent; }
  .data-table.wide.responsive-stack-table { min-width: 0; }
  .responsive-stack-table thead { display: none; }
  .responsive-stack-table tbody { display: grid; gap: 10px; }
  .responsive-stack-table tbody tr { display: grid; min-width: 0; border: 1px solid var(--line); background: var(--surface); }
  .responsive-stack-table tbody tr:hover { background: var(--surface); }
  .responsive-stack-table tbody td { min-width: 0; padding: 10px 12px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(92px, 34%) minmax(0, 1fr); align-items: start; gap: 10px; overflow-wrap: anywhere; }
  .responsive-stack-table tbody td:last-child { border-bottom: 0; }
  .responsive-stack-table tbody td::before,
  .responsive-stack-table tfoot th::before { content: attr(data-label); color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1.5; }
  .responsive-stack-table tbody td[colspan] { display: block; }
  .responsive-stack-table tbody td[colspan]::before { display: none; }
  .responsive-stack-table .table-title,
  .responsive-stack-table .analysis-conclusion { min-width: 0; max-width: none; }
  .responsive-stack-table .sourcing-stage-progress,
  .responsive-stack-table .sourcing-stage-plan { min-width: 0; width: 100%; }
  .responsive-stack-table .sourcing-stage-progress-track { min-width: 0; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 0; padding: 0; }
  .responsive-stack-table .sourcing-stage-progress-track::before { display: none; }
  .responsive-stack-table .sourcing-stage-segment small { white-space: normal; }
  .responsive-stack-table tfoot { display: grid; margin-top: 10px; border: 1px solid var(--line); background: var(--surface-subtle); }
  .responsive-stack-table tfoot tr { display: grid; }
  .responsive-stack-table tfoot th { min-width: 0; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(92px,34%) minmax(0,1fr); gap: 10px; white-space: normal; overflow-wrap: anywhere; }
  .responsive-stack-table tfoot th:last-child { border-bottom: 0; }
  .section-header:has(.section-collapse-toggle) { display: grid; grid-template-columns: minmax(0,1fr) auto; }
  .section-header:has(.section-collapse-toggle) .section-actions { grid-column: 1 / -1; width: 100%; justify-content: flex-start; }
  .form-collapsible > summary { min-height: 54px; padding: 10px 12px; }
}

/* v8: owner SMS center, automated reminders and manual sends */
.sms-center { min-width: 0; display: grid; gap: 12px; }
.sms-center-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.sms-center-metrics { display: flex; flex-wrap: wrap; gap: 6px; }
.sms-center-metrics span { min-height: 34px; padding: 6px 9px; border: 1px solid var(--line); background: var(--surface-subtle); color: var(--muted); font-size: 10px; display: inline-flex; align-items: center; gap: 5px; }
.sms-center-metrics b { color: var(--ink); font-size: 14px; }
.sms-center-metrics .success b { color: var(--green); }
.sms-center-metrics .danger b { color: var(--red); }
.sms-provider-note { min-height: 52px; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--green); background: #f2f8f4; display: grid; grid-template-columns: 22px minmax(0,1fr); align-items: center; gap: 9px; }
.sms-provider-note.warning { border-left-color: var(--amber); background: #fff8eb; }
.sms-provider-note > i { width: 18px; height: 18px; color: var(--green); }
.sms-provider-note.warning > i { color: #9a5d00; }
.sms-provider-note strong, .sms-provider-note small { display: block; }
.sms-provider-note small { margin-top: 3px; color: var(--muted); line-height: 1.45; }
.sms-template-list { max-height: 58vh; overflow-y: auto; border: 1px solid var(--line); background: var(--surface); }
.sms-template-group + .sms-template-group { border-top: 1px solid var(--line); }
.sms-template-group > summary, .sms-recipient-group > summary, .sms-recipient-picker-group > summary { list-style: none; cursor: pointer; }
.sms-template-group > summary::-webkit-details-marker, .sms-recipient-group > summary::-webkit-details-marker, .sms-recipient-picker-group > summary::-webkit-details-marker { display: none; }
.sms-template-group > summary { min-height: 62px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--surface); }
.sms-template-group[open] > summary { background: #f5f8fd; border-bottom: 1px solid var(--line); }
.sms-template-group > summary > span:first-child, .sms-recipient-group > summary > span:first-child, .sms-recipient-picker-group > summary > span:first-child { min-width: 0; display: flex; align-items: center; gap: 10px; }
.sms-template-group > summary > span:first-child > i { width: 19px; height: 19px; color: var(--blue); }
.sms-template-group summary strong, .sms-template-group summary small { display: block; }
.sms-template-group summary small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.sms-group-counts { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.sms-group-counts b { color: var(--ink); }
.sms-group-counts em { padding: 3px 5px; background: #fff0f0; color: var(--red); font-style: normal; font-weight: 700; }
.sms-group-counts > i:not([data-icon]) { color: #8a5300; font-style: normal; }
.sms-group-counts > i[data-icon] { width: 15px; height: 15px; transition: transform .16s ease; }
.sms-template-group[open] > summary .sms-group-counts > i[data-icon], .sms-recipient-group[open] > summary .sms-group-counts > i[data-icon], .sms-recipient-picker-group[open] > summary > small i { transform: rotate(90deg); }
.sms-template-body { padding: 0 13px 12px; background: #f8fafc; }
.sms-template-actions { min-height: 52px; padding: 8px 10px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff8f8; }
.sms-template-actions strong, .sms-template-actions small { display: block; }
.sms-template-actions strong { color: var(--red); }
.sms-template-actions small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.sms-template-actions button { flex: 0 0 auto; }
.sms-recipient-group { border-bottom: 1px solid var(--line); background: var(--surface); }
.sms-recipient-group:last-child { border-bottom: 0; }
.sms-recipient-group > summary { min-height: 53px; padding: 8px 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sms-recipient-group > summary > span:first-child > i { width: 17px; height: 17px; color: var(--muted); }
.sms-recipient-records { border-top: 1px solid var(--line); }
.sms-delivery-record { min-width: 0; padding: 11px; display: grid; grid-template-columns: 165px minmax(0,1fr) auto; gap: 14px; align-items: start; border-bottom: 1px solid var(--line); background: var(--surface); }
.sms-delivery-record:last-child { border-bottom: 0; }
.sms-delivery-record.failed, .sms-delivery-record.skipped { border-left: 3px solid var(--red); background: #fffafa; }
.sms-delivery-record.pending { border-left: 3px solid var(--amber); }
.sms-delivery-status { display: flex; gap: 8px; align-items: flex-start; }
.sms-delivery-status > i { flex: 0 0 auto; width: 16px; height: 16px; color: var(--muted); }
.sms-delivery-record.sent .sms-delivery-status > i { color: var(--green); }
.sms-delivery-record.failed .sms-delivery-status > i, .sms-delivery-record.skipped .sms-delivery-status > i { color: var(--red); }
.sms-delivery-status strong, .sms-delivery-status small, .sms-delivery-content small { display: block; }
.sms-delivery-status small, .sms-delivery-content small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.sms-delivery-content { min-width: 0; }
.sms-delivery-content p { margin: 0; line-height: 1.55; overflow-wrap: anywhere; }
.sms-delivery-content em { display: block; margin-top: 6px; color: var(--red); font-size: 10px; font-style: normal; font-weight: 700; overflow-wrap: anywhere; }
.sms-delivery-actions { display: flex; align-items: center; gap: 7px; }
.sms-source-badge { min-width: 56px; padding: 4px 6px; border: 1px solid #9ab7e6; background: #eef4ff; color: var(--blue); text-align: center; font-size: 9px; font-weight: 800; }
.sms-source-badge.manual { border-color: #d6ab6b; background: #fff7e8; color: #8a5300; }
.sms-recipient-scopes { margin-bottom: 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.sms-recipient-scopes > span { margin-left: auto; color: var(--blue); font-size: 11px; font-weight: 800; }
.sms-recipient-picker { max-height: 42vh; overflow-y: auto; border: 1px solid var(--line); }
.sms-recipient-picker-group + .sms-recipient-picker-group { border-top: 1px solid var(--line); }
.sms-recipient-picker-group > summary { min-height: 46px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface-subtle); }
.sms-recipient-picker-group > summary i { width: 15px; height: 15px; }
.sms-recipient-picker-group > summary small { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.sms-recipient-picker-group section > header { min-height: 38px; padding: 7px 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sms-employee-picker { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; background: var(--line); }
.sms-employee-option { min-width: 0; padding: 9px 10px; background: var(--surface); display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: center; gap: 8px; cursor: pointer; }
.sms-employee-option input { width: 16px; height: 16px; }
.sms-employee-option strong, .sms-employee-option small { display: block; min-width: 0; }
.sms-employee-option small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.sms-employee-option.missing-phone { border-left: 3px solid var(--red); }
.sms-employee-option.missing-phone em { color: var(--red); font-style: normal; }
.sms-manual-form .analysis-note p { overflow-wrap: anywhere; }

.presenter-profile-section { margin-top: 18px; }
.presenter-profile-group { border: 1px solid var(--line); background: var(--surface); }
.presenter-profile-group + .presenter-profile-group { margin-top: 10px; }
.presenter-profile-group > summary { list-style: none; min-height: 54px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; background: var(--surface-subtle); }
.presenter-profile-group > summary::-webkit-details-marker { display: none; }
.presenter-profile-group > summary > span { min-width: 0; display: flex; align-items: center; gap: 9px; }
.presenter-profile-group > summary > span > i { width: 17px; height: 17px; color: var(--blue); }
.presenter-profile-group > summary strong, .presenter-profile-group > summary small { display: block; }
.presenter-profile-group > summary small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.presenter-profile-group > summary > i { width: 15px; height: 15px; color: var(--muted); transition: transform .16s ease; }
.presenter-profile-group[open] > summary > i { transform: rotate(90deg); }
.presenter-profile-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 10px; padding: 11px; border-top: 1px solid var(--line); }
.presenter-profile-card { min-width: 0; padding: 12px; border: 1px solid var(--line); background: #fff; }
.presenter-profile-card.is-missing { border-left: 3px solid var(--amber); background: #fffaf0; }
.presenter-profile-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.presenter-profile-card > header strong, .presenter-profile-card > header small { display: block; }
.presenter-profile-card > header small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.presenter-profile-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px 12px; margin-top: 12px; color: var(--ink); font-size: 11px; }
.presenter-profile-facts span { min-width: 0; overflow-wrap: anywhere; }
.presenter-profile-facts em { color: var(--muted); font-style: normal; }
.presenter-profile-actions { display: flex; justify-content: flex-end; margin-top: 12px; }

@media (max-width: 720px) {
  .presenter-profile-grid { grid-template-columns: 1fr; }
  .presenter-profile-facts { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .sms-center-toolbar { align-items: stretch; flex-direction: column; }
  .sms-center-toolbar .section-actions { width: 100%; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .sms-center-toolbar .section-actions button { min-width: 0; justify-content: center; }
  .sms-template-list { max-height: 54vh; }
  .sms-template-group > summary, .sms-recipient-group > summary { align-items: flex-start; }
  .sms-group-counts { flex-wrap: wrap; justify-content: flex-end; }
  .sms-template-actions { align-items: stretch; flex-direction: column; }
  .sms-template-actions button { width: 100%; justify-content: center; }
  .sms-delivery-record { grid-template-columns: 1fr; gap: 8px; }
  .sms-delivery-actions { justify-content: space-between; }
  .sms-employee-picker { grid-template-columns: 1fr; }
  .sms-recipient-scopes > span { width: 100%; margin-left: 0; }
}
.daily-report-employee-overview > .section-header [data-daily-report-exemptions] { display: none; }
.inventory-intake-stats { margin: 9px 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid var(--line); background: var(--surface); }
.inventory-intake-stats span { min-width: 0; padding: 8px 9px; border-right: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.inventory-intake-stats span:last-child { border-right: 0; }
.inventory-intake-stats b { margin-right: 4px; color: var(--ink); font-size: 15px; }
.inventory-intake-warning { color: var(--amber); font-weight: 700; }
.daily-report-employee-actions [data-daily-report-exemptions-for] { border-color: #b8cbe8; color: #315d98; }
.daily-report-exempt-date { cursor: pointer; user-select: none; }
.livestream-plan-picker { margin-top: 10px; padding: 12px; border: 1px solid var(--border, #d7dee8); border-radius: 8px; background: var(--surface-muted, #f7f9fc); }
.livestream-plan-picker legend { padding: 0 6px; font-size: 13px; font-weight: 700; color: var(--text-muted, #53657c); }
.livestream-plan-filter-note { margin: 0 0 10px; color: var(--text-muted, #53657c); font-size: 12px; line-height: 1.5; }
.livestream-plan-choice-list { display: grid; gap: 8px; max-height: 260px; overflow: auto; }
.livestream-plan-choice { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border, #d7dee8); border-radius: 7px; background: #fff; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.livestream-plan-choice[hidden] { display: none !important; }
.livestream-plan-choice:hover, .livestream-plan-choice.selected { border-color: #2878d4; background: #eef6ff; }
.livestream-plan-choice input { margin-top: 3px; accent-color: #2878d4; }
.livestream-plan-choice span { display: grid; gap: 3px; min-width: 0; }
.livestream-plan-choice-title { display: block; color: var(--text, #17212f); font-size: 14px; font-weight: 700; }
.livestream-plan-choice strong { color: var(--text, #17212f); font-size: 14px; }
.livestream-plan-choice small { color: var(--text-muted, #65758b); line-height: 1.45; }
.livestream-account-emphasis { color: #17633a; font-weight: 800; }
.livestream-date-emphasis { color: #2166d1; font-weight: 800; }
.livestream-plan-choice .livestream-account-emphasis,
.livestream-plan-main .livestream-account-emphasis,
.livestream-session-card .livestream-account-emphasis { color: #17633a; }
.livestream-plan-choice .livestream-date-emphasis,
.livestream-plan-main .livestream-date-emphasis,
.livestream-session-card .livestream-date-emphasis { color: #2166d1; }
.livestream-session-heading { margin-top: 14px; }
.livestream-plan-people-picker { margin: 0; padding: 12px; border: 1px solid var(--line); background: var(--surface-subtle); }
.livestream-plan-people-picker legend { padding: 0 6px; color: var(--ink); font-weight: 800; }
.livestream-plan-people-picker > .form-hint { margin: 0 0 10px; }
.livestream-plan-people-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.livestream-plan-people-columns section { min-width: 0; border: 1px solid var(--line); background: var(--surface); }
.livestream-plan-people-columns h4 { margin: 0; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 12px; }
.livestream-plan-person-list { display: grid; gap: 1px; max-height: 190px; overflow-y: auto; background: var(--line); }
.livestream-plan-person-option { min-width: 0; padding: 8px 10px; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 8px; background: var(--surface); cursor: pointer; }
.livestream-plan-person-option:hover { background: #eef6ff; }
.livestream-plan-person-option input { margin-top: 2px; accent-color: var(--blue); }
.livestream-plan-person-option strong, .livestream-plan-person-option small { display: block; min-width: 0; overflow-wrap: anywhere; }
.livestream-plan-person-option small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.livestream-recurrence-days { margin: 0; padding: 12px; border: 1px solid var(--line); background: var(--surface-subtle); }
.livestream-recurrence-days legend { padding: 0 6px; font-weight: 800; }
.livestream-recurrence-days > .form-hint { margin: 0 0 10px; }
.livestream-schedule-slot-list { display: grid; gap: 8px; margin-bottom: 10px; }
.livestream-schedule-slot { display: grid; grid-template-columns: minmax(100px,.8fr) minmax(120px,1fr) minmax(130px,1fr) 40px; gap: 8px; align-items: end; }
.livestream-schedule-slot > label { min-width: 0; }
.livestream-schedule-slot .icon-button { width: 40px; height: 40px; }
.livestream-weekday-options { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 6px; }
.livestream-weekday-options .check-option { min-width: 0; min-height: 42px; padding: 8px; justify-content: center; text-align: center; }
.livestream-weekday-options .check-option input { accent-color: var(--blue); }
.livestream-weekday-options .check-option span { min-width: 0; }
.presenter-availability-windows { display: grid; gap: 10px; }
.presenter-availability-row { padding: 10px; border: 1px solid var(--line); background: var(--surface-subtle); }
.presenter-availability-row .metric-input-grid { align-items: end; }
.presenter-availability-days { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.presenter-availability-days .check-option { min-height: 30px; padding: 5px 8px; }
.presenter-availability-days .check-option input { accent-color: var(--blue); }
.presenter-availability-remove { margin-top: 8px; }
@media (max-width: 720px) {
  .inventory-intake-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .inventory-intake-stats span:nth-child(2) { border-right: 0; }
  .inventory-intake-stats span:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .livestream-plan-people-columns { grid-template-columns: 1fr; }
  .livestream-weekday-options { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .livestream-schedule-slot { grid-template-columns: 1fr 1fr 40px; }
  .livestream-schedule-slot > label:nth-child(3) { grid-column: 1 / 3; }
}

.amazon-operations-list { display: grid; gap: 10px; }
.amazon-operations-store { min-width: 0; border: 1px solid var(--line); background: var(--surface); }
.amazon-operations-store > summary { min-height: 58px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; cursor: pointer; background: var(--surface-subtle); }
.amazon-operations-store > summary::-webkit-details-marker { display: none; }
.amazon-operations-store > summary > span { min-width: 0; display: flex; align-items: center; gap: 9px; }
.amazon-operations-store > summary strong, .amazon-operations-store > summary small { display: block; }
.amazon-operations-store > summary small { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.amazon-operations-store > summary > span:last-child { justify-content: flex-end; flex-wrap: wrap; }
.amazon-operations-store > summary > span:last-child > i { width: 15px; height: 15px; transition: transform .16s ease; }
.amazon-operations-store[open] > summary > span:last-child > i { transform: rotate(90deg); }
.amazon-operations-body { padding: 12px; border-top: 1px solid var(--line); }
.amazon-operations-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.amazon-operations-toolbar h3, .amazon-operations-toolbar p { margin: 0; }
.amazon-operations-toolbar p { margin-top: 4px; color: var(--muted); font-size: 11px; }
.amazon-operations-toolbar .section-actions { justify-content: flex-end; flex-wrap: wrap; }
.amazon-operations-summary { margin-top: 10px; border: 1px solid #bad1f3; background: #f7faff; }
.amazon-operations-summary > header { min-height: 40px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #d8e5f7; }
.amazon-operations-summary > header strong { color: #164f9b; }
.amazon-operations-summary > header small { color: var(--muted); text-align: right; }
.amazon-operations-summary > div { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.amazon-operations-summary > div > span { min-width: 0; padding: 9px 10px; display: flex; flex-direction: column; gap: 3px; border-right: 1px solid #d8e5f7; }
.amazon-operations-summary > div > span:last-child { border-right: 0; }
.amazon-operations-summary small { font-size: 10px; }
.amazon-operations-summary b { color: var(--ink); overflow-wrap: anywhere; }
.amazon-module-grid { margin-top: 10px; display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); border: 1px solid var(--line); }
.amazon-module-state { min-width: 0; min-height: 52px; padding: 8px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.amazon-module-state:last-child { border-right: 0; }
.amazon-module-state b { color: var(--ink); font-size: 11px; }
.amazon-module-state.ready { background: #eef9f4; color: #087a53; }
.amazon-module-state.failed { background: #fff2f2; color: var(--red); }
.amazon-ops-tabs { margin-top: 10px; border: 1px solid var(--line); }
.amazon-ops-tabs > details + details { border-top: 1px solid var(--line); }
.amazon-ops-tabs > details > summary { min-height: 44px; padding: 9px 11px; display: flex; align-items: center; font-weight: 800; cursor: pointer; background: #fff; }
.amazon-ops-tabs > details[open] > summary { background: var(--surface-subtle); }
.amazon-ops-tabs td small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.amazon-ads-status { padding: 12px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.amazon-ads-status > * { min-width: 0; overflow-wrap: anywhere; }
.amazon-ads-status small { grid-column: 1 / -1; color: var(--muted); }

.auth-panel-lanqier { border-top: 3px solid #0f766e; }
.brand-mark-lanqier { background: #0f766e; color: #fff; }
.lanqier-pending { margin-bottom: 14px; }
.lanqier-workspace { border-top: 3px solid #0f766e; }
.lanqier-workspace .section-header { align-items: flex-start; }
.lanqier-workspace .section-actions { align-items: center; }
.lanqier-metrics { margin-top: 14px; }

/* Group portal layout follows the V14 company-entry design while keeping the
   existing Tututoo/Jiding form handlers and accessibility hooks intact. */
.auth-screen { min-height: 100vh; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-template-rows: 112px minmax(0,1fr) 48px; background: #dde0dc; color: #272d2b; }
.auth-portal-header { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px,6vw,128px); background: #f1f3ef; border-bottom: 1px solid #d2d6d1; }
.auth-portal-brand { display: flex; align-items: center; gap: 14px; }
.auth-portal-mark { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #272d2b; font-size: 20px; font-weight: 900; }
.auth-portal-brand strong, .auth-portal-brand small { display: block; }
.auth-portal-brand strong { font-size: 16px; letter-spacing: 1px; }
.auth-portal-brand small { margin-top: 6px; color: #979e99; font-size: 8px; letter-spacing: 2px; }
.auth-portal-meta { display: flex; align-items: center; gap: 17px; color: #6f7773; font-size: 11px; }
.auth-portal-meta::before { content: ""; width: 27px; height: 1px; background: #927a56; }
.auth-portal-meta strong { color: #272d2b; }
.auth-panel { position: relative; min-width: 0; justify-content: flex-start; padding: 38px clamp(25px,4.6vw,94px) 40px; background: #f1f3ef; color: #272d2b; }
.auth-panel + .auth-panel { border-left: 1px solid #d2d6d1; }
.auth-panel::before { content: ""; position: absolute; top: 0; left: clamp(25px,4.6vw,94px); width: 54px; height: 4px; background: #3d8179; }
.auth-panel::after { content: attr(data-portal-number); position: absolute; top: 30px; right: clamp(25px,4.6vw,94px); color: #cbd8d4; font-size: 62px; line-height: 1; font-weight: 800; }
.auth-panel-jiding { background: #eff1f3; color: #272d2b; }
.auth-panel-jiding::before { background: #687e9b; }
.auth-panel-jiding::after { color: #ccd3dd; }
.auth-panel-lanqier { background: #f0f2ed; color: #272d2b; border-top: 0; }
.auth-panel-lanqier::before { background: #73896c; }
.auth-panel-lanqier::after { color: #cfd8cc; }
.auth-panel > * { position: relative; z-index: 1; }
.auth-panel .brand-mark { width: 66px; height: 66px; margin: 72px 0 0; border: 1px solid #3d8179; border-radius: 0; background: #e1ece9; color: #3d8179; font-size: 20px; }
.auth-panel-jiding .brand-mark { border-color: #687e9b; background: #e3e8ef; color: #687e9b; }
.auth-panel-lanqier .brand-mark { border-color: #73896c; background: #e5ebe2; color: #73896c; }
.auth-panel .eyebrow { margin-top: 26px; color: #3d8179; font-size: 12px; letter-spacing: 1px; }
.auth-panel-jiding .eyebrow { color: #687e9b; }
.auth-panel-lanqier .eyebrow { color: #73896c; }
.auth-panel h1 { max-width: 430px; margin-top: 0; font-size: clamp(28px,3.15vw,44px); line-height: 1.16; }
.auth-panel .auth-description { max-width: 410px; margin: 20px 0 0; color: #56615c; font-size: 14px; line-height: 1.75; }
.auth-panel .auth-form { width: 100%; max-width: 420px; margin-top: 28px; padding: 20px; border-left: 4px solid #3d8179; background: #e1ece9; gap: 13px; }
.auth-panel-jiding .auth-form { border-left-color: #687e9b; background: #e3e8ef; }
.auth-panel-lanqier .auth-form { border-left-color: #73896c; background: #e5ebe2; }
.auth-panel .auth-form label { color: #4f5a55; font-size: 12px; }
.auth-panel .auth-form input { height: 50px; border: 1.5px solid #3d8179; border-radius: 0; background: #fbfbf8; font-size: 15px; }
.auth-panel-jiding .auth-form input { border-color: #687e9b; }
.auth-panel-lanqier .auth-form input { border-color: #73896c; }
.auth-panel .auth-form .primary-button { min-height: 52px; margin-top: 8px; background: #3d8179; border-radius: 0; }
.auth-panel-jiding .auth-form .primary-button { background: #687e9b; }
.auth-panel-lanqier .auth-form .primary-button { background: #73896c; }
.auth-panel .auth-boundary-note { width: 100%; max-width: 420px; margin-top: 18px; padding-top: 14px; border-top: 1px solid #d2d6d1; color: #6f7773; }
.auth-panel .auth-boundary-note strong { color: #272d2b; }
.auth-panel-lanqier .secondary-button { border-color: #9caf97; color: #52694d; background: transparent; border-radius: 0; }
.auth-panel-lanqier .lanqier-pending { margin-bottom: 10px; }
.auth-portal-footer { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding-inline: clamp(24px,6vw,128px); background: #f1f3ef; border-top: 1px solid #d2d6d1; color: #979e99; font-size: 10px; }
.auth-portal-footer strong { color: #585f58; }
.auth-portal-footer .portal-version { color: #6d756f; font-weight: 700; letter-spacing: .4px; }
.auth-portal-footer .portal-version-group { display: flex; align-items: center; gap: 10px; }
.auth-portal-footer .portal-client-version:empty { display: none; }
.auth-portal-footer .portal-client-version { color: #245f9e; font-weight: 700; letter-spacing: .4px; white-space: nowrap; }
@media (max-width: 820px) {
  .auth-screen { display: block; }
  .auth-portal-header { min-height: 105px; padding: 23px 28px; }
  .auth-portal-meta { display: none; }
  .auth-panel { min-height: 670px; padding: 34px 28px 37px; }
  .auth-panel + .auth-panel { border-left: 0; border-top: 1px solid #d2d6d1; }
  .auth-panel::before { left: 28px; }
  .auth-panel::after { right: 28px; }
  .auth-panel .brand-mark { margin-top: 73px; }
  .auth-panel h1 { font-size: clamp(29px,8vw,42px); }
  .auth-portal-footer { min-height: 66px; padding: 13px 28px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 5px; }
}
@media (max-width: 430px) {
  .auth-portal-header { min-height: 91px; padding: 20px; }
  .auth-portal-mark { width: 36px; height: 36px; }
  .auth-portal-brand strong { font-size: 14px; }
  .auth-panel { min-height: 630px; padding: 27px 20px 30px; }
  .auth-panel::before { left: 20px; }
  .auth-panel::after { top: 28px; right: 20px; font-size: 45px; }
  .auth-panel .brand-mark { width: 56px; height: 56px; margin-top: 58px; }
  .auth-panel .eyebrow { margin-top: 21px; font-size: 10px; }
  .auth-panel h1 { margin-top: 0; font-size: 29px; }
  .auth-panel .auth-description { margin-top: 18px; font-size: 12px; }
  .auth-panel .auth-form { margin-top: 27px; padding: 19px; }
  .auth-panel .auth-form label { font-size: 10px; }
  .auth-panel .auth-form input { height: 48px; font-size: 13px; }
  .auth-portal-footer { padding-inline: 20px; }
}
.lanqier-module-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.lanqier-module { min-width: 0; border: 1px solid var(--line); background: var(--surface); }
.lanqier-module > summary { min-height: 56px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; cursor: pointer; background: var(--surface-subtle); }
.lanqier-module > summary::-webkit-details-marker { display: none; }
.lanqier-module > summary > span, .lanqier-module > summary > b { min-width: 0; display: flex; align-items: center; gap: 8px; }
.lanqier-module > summary > span { flex-direction: column; align-items: flex-start; }
.lanqier-module > summary small { color: var(--muted); font-weight: 500; }
.lanqier-module > summary b { color: #0f766e; white-space: nowrap; }
.lanqier-module > summary i { width: 14px; height: 14px; transition: transform .16s ease; }
.lanqier-module[open] > summary i { transform: rotate(90deg); }
.lanqier-module-body { padding: 10px 12px; border-top: 1px solid var(--line); }
.lanqier-record-list { display: grid; gap: 7px; }
.lanqier-record { padding: 7px 8px; border-left: 3px solid #99d5ce; background: #f3fbfa; }
.lanqier-record strong, .lanqier-record small { display: block; overflow-wrap: anywhere; }
.lanqier-record small { margin-top: 2px; color: var(--muted); }
@media (max-width: 720px) {
  .lanqier-module-list { grid-template-columns: 1fr; }
  .lanqier-workspace .section-header { flex-direction: column; }
  .lanqier-workspace .section-actions { width: 100%; justify-content: space-between; }
}

@media (max-width: 900px) {
  .amazon-operations-toolbar { flex-direction: column; }
  .amazon-operations-toolbar .section-actions { width: 100%; justify-content: flex-start; }
  .amazon-operations-summary > div { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .amazon-operations-summary > div > span:nth-child(2) { border-right: 0; }
  .amazon-operations-summary > div > span:nth-child(-n+2) { border-bottom: 1px solid #d8e5f7; }
  .amazon-module-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .amazon-module-state:nth-child(3) { border-right: 0; }
  .amazon-module-state:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .amazon-ads-status { grid-template-columns: 1fr; }
  .amazon-ads-status small { grid-column: auto; }
}

@media (max-width: 520px) {
  .amazon-operations-store > summary { align-items: flex-start; flex-direction: column; }
  .amazon-operations-store > summary > span:last-child { width: 100%; justify-content: space-between; }
  .amazon-operations-body { padding: 9px; }
  .amazon-operations-summary > header { align-items: flex-start; flex-direction: column; }
  .amazon-operations-summary > header small { text-align: left; }
  .amazon-operations-toolbar .section-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .amazon-operations-toolbar .section-actions button { min-width: 0; justify-content: center; }
  .amazon-module-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .amazon-module-state:nth-child(2n) { border-right: 0; }
  .amazon-module-state:nth-child(3) { border-right: 1px solid var(--line); }
  .amazon-module-state:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
}

.warehouse-document-fields { margin: 14px 0; }
.warehouse-review-table table { min-width: 1040px; table-layout: fixed; }
.warehouse-review-table th:nth-child(1) { width: 112px; }
.warehouse-review-table th:nth-child(2) { width: 260px; }
.warehouse-review-table th:nth-child(3) { width: 190px; }
.warehouse-review-table th:nth-child(4) { width: 90px; }
.warehouse-review-table th:nth-child(5) { width: 150px; }
.warehouse-review-table input:not([type="checkbox"]) { box-sizing: border-box; width: 100%; min-width: 0; margin: 2px 0; padding: 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--text); }
.warehouse-review-table .check-line.compact { margin-top: 6px; font-size: 12px; }
.monitoring-module-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.monitoring-module-list .check-line { align-items: flex-start; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.monitoring-module-list .check-line span { display: grid; gap: 3px; }
.monitoring-module-list .check-line small { color: var(--muted); line-height: 1.45; }

@media (max-width: 720px) {
  .monitoring-module-list { grid-template-columns: 1fr; }
  .warehouse-review-table { overflow: visible; }
  .warehouse-review-table table, .warehouse-review-table tbody { display: block; min-width: 0; width: 100%; }
  .warehouse-review-table thead { display: none; }
  .warehouse-review-table tr { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; margin-bottom: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
  .warehouse-review-table td { display: block; min-width: 0; padding: 0; border: 0; }
  .warehouse-review-table td:nth-child(2), .warehouse-review-table td:nth-child(3), .warehouse-review-table td:nth-child(6) { grid-column: 1 / -1; }
}

/* UI REGION BOUNDARIES — calm hierarchy, not a frame around every fragment.
   Main cards retain a fine neutral boundary. Nested wrappers and small fields
   keep their original separators. Only the nearest region responds to hover.
   data-ui-region="primary" opts in; screen only, no geometry changes. */
@media screen {
:where(#view-root, #dialog-body, #notification-panel) :is(
  .section,
  .direct-inventory-card,
  .metric,
  .update-card,
  .project-card,
  .livestream-session-card,
  .livestream-plan-row,
  .live-scan-current,
  .live-scan-sales-panel,
  .inventory-live-product,
  .email-message,
  .account-scope-result,
  .task-definition,
  .task-verification,
  .task-delegation,
  .kpi-item,
  .daily-report-personal-analysis,
  .finance-record-grid > div,
  .finance-record-grid > section,
  .config-block,
  .replenishment-plan-card,
  .inquiry-row,
  .scan-supplement-item,
  [data-ui-region="primary"]
) {
  --ui-region-line: #d7dfe8;
  --ui-region-active: #91a8be;
  outline: 1px solid var(--ui-region-line);
  outline-offset: -1px;
}
:where(#view-root, #dialog-body, #notification-panel) :is(
  .section,
  .direct-inventory-card,
  .metric,
  .update-card,
  .project-card,
  .livestream-session-card,
  .livestream-plan-row,
  .live-scan-current,
  .live-scan-sales-panel,
  .inventory-live-product,
  .email-message,
  .account-scope-result,
  .task-definition,
  .task-verification,
  .task-delegation,
  .kpi-item,
  .daily-report-personal-analysis,
  .finance-record-grid > div,
  .finance-record-grid > section,
  .config-block,
  .replenishment-plan-card,
  .inquiry-row,
  .scan-supplement-item,
  [data-ui-region="primary"]
):has(:is(
  .section,
  .direct-inventory-card,
  .metric,
  .update-card,
  .project-card,
  .livestream-session-card,
  .livestream-plan-row,
  .live-scan-current,
  .live-scan-sales-panel,
  .inventory-live-product,
  .email-message,
  .account-scope-result,
  .task-definition,
  .task-verification,
  .task-delegation,
  .kpi-item,
  .daily-report-personal-analysis,
  .finance-record-grid > div,
  .finance-record-grid > section,
  .config-block,
  .replenishment-plan-card,
  .inquiry-row,
  .scan-supplement-item,
  [data-ui-region="primary"]
)) {
  /* Avoid drawing another custom frame around a group of already framed cards. */
  outline: none;
}
@media (hover: hover) and (pointer: fine) {
:where(#view-root, #dialog-body, #notification-panel) :is(
  .section,
  .direct-inventory-card,
  .metric,
  .update-card,
  .project-card,
  .livestream-session-card,
  .livestream-plan-row,
  .live-scan-current,
  .live-scan-sales-panel,
  .inventory-live-product,
  .email-message,
  .account-scope-result,
  .task-definition,
  .task-verification,
  .task-delegation,
  .kpi-item,
  .daily-report-personal-analysis,
  .finance-record-grid > div,
  .finance-record-grid > section,
  .config-block,
  .replenishment-plan-card,
  .inquiry-row,
  .scan-supplement-item,
  [data-ui-region="primary"]
):hover:not(:has(:is(
  .section,
  .direct-inventory-card,
  .metric,
  .update-card,
  .project-card,
  .livestream-session-card,
  .livestream-plan-row,
  .live-scan-current,
  .live-scan-sales-panel,
  .inventory-live-product,
  .email-message,
  .account-scope-result,
  .task-definition,
  .task-verification,
  .task-delegation,
  .kpi-item,
  .daily-report-personal-analysis,
  .finance-record-grid > div,
  .finance-record-grid > section,
  .config-block,
  .replenishment-plan-card,
  .inquiry-row,
  .scan-supplement-item,
  [data-ui-region="primary"]
):hover)) {
  outline: 1px solid var(--ui-region-active);
  outline-offset: -1px;
}
}
:where(#view-root, #dialog-body, #notification-panel) :is(
  .section,
  .direct-inventory-card,
  .metric,
  .update-card,
  .project-card,
  .livestream-session-card,
  .livestream-plan-row,
  .live-scan-current,
  .live-scan-sales-panel,
  .inventory-live-product,
  .email-message,
  .account-scope-result,
  .task-definition,
  .task-verification,
  .task-delegation,
  .kpi-item,
  .daily-report-personal-analysis,
  .finance-record-grid > div,
  .finance-record-grid > section,
  .config-block,
  .replenishment-plan-card,
  .inquiry-row,
  .scan-supplement-item,
  [data-ui-region="primary"]
):has(:focus-visible):not(:has(:is(
  .section,
  .direct-inventory-card,
  .metric,
  .update-card,
  .project-card,
  .livestream-session-card,
  .livestream-plan-row,
  .live-scan-current,
  .live-scan-sales-panel,
  .inventory-live-product,
  .email-message,
  .account-scope-result,
  .task-definition,
  .task-verification,
  .task-delegation,
  .kpi-item,
  .daily-report-personal-analysis,
  .finance-record-grid > div,
  .finance-record-grid > section,
  .config-block,
  .replenishment-plan-card,
  .inquiry-row,
  .scan-supplement-item,
  [data-ui-region="primary"]
) :focus-visible)) {
  /* Keyboard location remains clear without lighting all containing panels. */
  outline: 2px solid #7090ad;
  outline-offset: -2px;
}
@media (forced-colors: active) {
:where(#view-root, #dialog-body, #notification-panel) :is(
  .section,
  .direct-inventory-card,
  .metric,
  .update-card,
  .project-card,
  .livestream-session-card,
  .livestream-plan-row,
  .live-scan-current,
  .live-scan-sales-panel,
  .inventory-live-product,
  .email-message,
  .account-scope-result,
  .task-definition,
  .task-verification,
  .task-delegation,
  .kpi-item,
  .daily-report-personal-analysis,
  .finance-record-grid > div,
  .finance-record-grid > section,
  .config-block,
  .replenishment-plan-card,
  .inquiry-row,
  .scan-supplement-item,
  [data-ui-region="primary"]
) { outline-color: CanvasText; }
:where(#view-root, #dialog-body, #notification-panel) :is(
  .section,
  .direct-inventory-card,
  .metric,
  .update-card,
  .project-card,
  .livestream-session-card,
  .livestream-plan-row,
  .live-scan-current,
  .live-scan-sales-panel,
  .inventory-live-product,
  .email-message,
  .account-scope-result,
  .task-definition,
  .task-verification,
  .task-delegation,
  .kpi-item,
  .daily-report-personal-analysis,
  .finance-record-grid > div,
  .finance-record-grid > section,
  .config-block,
  .replenishment-plan-card,
  .inquiry-row,
  .scan-supplement-item,
  [data-ui-region="primary"]
):has(:focus-visible) { outline-color: Highlight; }
}
}
/* END UI REGION BOUNDARIES */
/* SAVE ERROR LOCATOR: one calm boundary, only the warning icon pulses for 5s. */
.save-error-target{outline:2px solid #dd8a12!important;outline-offset:3px;scroll-margin-block:80px}
.save-error-callout{position:fixed;z-index:100100;display:flex;align-items:flex-start;gap:8px;max-width:min(420px,calc(100vw - 16px));box-sizing:border-box;padding:9px 12px;border:1px solid #e5b764;border-radius:8px;background:#fff8e8;color:#754600;box-shadow:0 3px 12px #35220020;font-size:14px;line-height:1.45;overflow-wrap:anywhere;pointer-events:none}
.save-error-icon{font-size:20px;line-height:1;flex:none;animation:save-error-pulse 1s ease-in-out 5}
@keyframes save-error-pulse{0%,100%{opacity:1}50%{opacity:.35}}
@media(prefers-reduced-motion:reduce){.save-error-icon{animation:none}}
.section-header-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
[data-open-sales-dispatch],.sales-dispatch-confirm-button{background:#16835f!important;border-color:#16835f!important;color:#fff!important}
[data-open-sales-dispatch]:hover,.sales-dispatch-confirm-button:hover{background:#0f6f50!important;border-color:#0f6f50!important}
.sales-dispatch-add{margin:14px 0;padding:12px;border:1px solid #b9dfd0;background:#f3fbf7}.sales-dispatch-add>label{display:flex;align-items:center;gap:8px}.sales-dispatch-add input{width:100%;border:1px solid var(--line);border-radius:6px;padding:10px 12px;background:#fff}.sales-dispatch-search-row{display:grid;grid-template-columns:44px minmax(220px,1fr) 160px auto;align-items:center;gap:10px;padding:9px 0;border-top:1px solid var(--line)}.sales-dispatch-search-row:first-child{margin-top:10px}.sales-dispatch-search-row img{width:42px;height:42px;object-fit:contain;background:#fff;border:1px solid var(--line)}.sales-dispatch-search-row span{display:grid}.sales-dispatch-search-row small{color:var(--muted)}
.sales-dispatch-table input,.sales-dispatch-table select{width:100%;min-width:90px;padding:7px 8px;border:1px solid var(--line);border-radius:5px;background:#fff}.sales-dispatch-table input[name="quantity"]{min-width:72px;font-weight:800;color:var(--red)}.sales-dispatch-table input[name="notes"]{min-width:150px}.sales-dispatch-status{display:inline-flex;margin-top:6px;padding:4px 9px;border-radius:999px;background:#fff4d8;color:#8a5a00;font-weight:700}.sales-dispatch-status.confirmed{background:#e5f6ee;color:#116846}.sales-dispatch-remove{margin-top:5px}
@media(max-width:760px){.sales-dispatch-search-row{grid-template-columns:42px 1fr}.sales-dispatch-search-row select,.sales-dispatch-search-row button{grid-column:2}.sales-dispatch-sheet{min-width:760px}}
.sales-dispatch-sheet{border:1px solid var(--line);background:#fff;padding:18px;min-width:880px}
.sales-dispatch-sheet>header{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:14px}.sales-dispatch-sheet h2{margin:2px 0;font-size:24px}.sales-dispatch-summary{display:grid;grid-template-columns:repeat(2,minmax(120px,1fr));gap:6px 14px}.sales-dispatch-summary span{font-size:12px;color:var(--muted)}.sales-dispatch-summary b{display:block;font-size:20px;color:var(--ink)}
.sales-dispatch-product{display:flex;align-items:center;gap:10px;min-width:230px}.sales-dispatch-product img{width:58px;height:58px;object-fit:contain;border:1px solid var(--line);background:#fff}.sales-dispatch-product span{display:grid}.sales-dispatch-product small{color:var(--muted)}.sales-dispatch-quantity{font-size:22px;font-weight:800;color:var(--red)}.sales-dispatch-sheet>footer{display:flex;justify-content:space-between;gap:20px;margin-top:18px;padding-top:12px;border-top:1px solid var(--line);font-size:12px}
@media print{body.printing-sales-dispatch>*{display:none!important}body.printing-sales-dispatch #dialog-layer{display:block!important;position:static!important;background:#fff!important}body.printing-sales-dispatch #dialog-layer>*{display:none!important}body.printing-sales-dispatch #dialog-layer .dialog{display:block!important;position:static!important;width:100%!important;max-width:none!important;max-height:none!important;box-shadow:none!important;border:0!important}body.printing-sales-dispatch .dialog-header,body.printing-sales-dispatch .form-actions,body.printing-sales-dispatch #sales-dispatch-form>label{display:none!important}body.printing-sales-dispatch #sales-dispatch-result{display:block!important}body.printing-sales-dispatch .sales-dispatch-sheet{display:block!important;min-width:0!important;border:0!important;padding:0!important}body.printing-sales-dispatch .sales-dispatch-table{font-size:10pt}body.printing-sales-dispatch .sales-dispatch-table img{width:42px;height:42px}}

/* CSP: 页面 CSP 为 style-src 'self'，内联 style 属性会被浏览器拦掉，
   动态宽度一律改用下面的宽度类（由 progressFillClass() 生成）。 */
.fill-0{width:0%}
.fill-1{width:1%}
.fill-2{width:2%}
.fill-3{width:3%}
.fill-4{width:4%}
.fill-5{width:5%}
.fill-6{width:6%}
.fill-7{width:7%}
.fill-8{width:8%}
.fill-9{width:9%}
.fill-10{width:10%}
.fill-11{width:11%}
.fill-12{width:12%}
.fill-13{width:13%}
.fill-14{width:14%}
.fill-15{width:15%}
.fill-16{width:16%}
.fill-17{width:17%}
.fill-18{width:18%}
.fill-19{width:19%}
.fill-20{width:20%}
.fill-21{width:21%}
.fill-22{width:22%}
.fill-23{width:23%}
.fill-24{width:24%}
.fill-25{width:25%}
.fill-26{width:26%}
.fill-27{width:27%}
.fill-28{width:28%}
.fill-29{width:29%}
.fill-30{width:30%}
.fill-31{width:31%}
.fill-32{width:32%}
.fill-33{width:33%}
.fill-34{width:34%}
.fill-35{width:35%}
.fill-36{width:36%}
.fill-37{width:37%}
.fill-38{width:38%}
.fill-39{width:39%}
.fill-40{width:40%}
.fill-41{width:41%}
.fill-42{width:42%}
.fill-43{width:43%}
.fill-44{width:44%}
.fill-45{width:45%}
.fill-46{width:46%}
.fill-47{width:47%}
.fill-48{width:48%}
.fill-49{width:49%}
.fill-50{width:50%}
.fill-51{width:51%}
.fill-52{width:52%}
.fill-53{width:53%}
.fill-54{width:54%}
.fill-55{width:55%}
.fill-56{width:56%}
.fill-57{width:57%}
.fill-58{width:58%}
.fill-59{width:59%}
.fill-60{width:60%}
.fill-61{width:61%}
.fill-62{width:62%}
.fill-63{width:63%}
.fill-64{width:64%}
.fill-65{width:65%}
.fill-66{width:66%}
.fill-67{width:67%}
.fill-68{width:68%}
.fill-69{width:69%}
.fill-70{width:70%}
.fill-71{width:71%}
.fill-72{width:72%}
.fill-73{width:73%}
.fill-74{width:74%}
.fill-75{width:75%}
.fill-76{width:76%}
.fill-77{width:77%}
.fill-78{width:78%}
.fill-79{width:79%}
.fill-80{width:80%}
.fill-81{width:81%}
.fill-82{width:82%}
.fill-83{width:83%}
.fill-84{width:84%}
.fill-85{width:85%}
.fill-86{width:86%}
.fill-87{width:87%}
.fill-88{width:88%}
.fill-89{width:89%}
.fill-90{width:90%}
.fill-91{width:91%}
.fill-92{width:92%}
.fill-93{width:93%}
.fill-94{width:94%}
.fill-95{width:95%}
.fill-96{width:96%}
.fill-97{width:97%}
.fill-98{width:98%}
.fill-99{width:99%}
.fill-100{width:100%}
.serial-scanner-panel{padding:10px 12px;margin:8px 0;background:#eef6ff;border:1px solid #9bbce5;border-radius:8px;display:flex;gap:12px;align-items:center;flex-wrap:wrap;font:14px system-ui}
.serial-scanner-status{flex:1}


/* CSP: 页面 style-src 为 'self'，内联 style 会被拦掉；发货单图片大小选择器用类样式。 */
.sales-dispatch-print-size{display:inline-flex;align-items:center;gap:6px;margin-right:auto;color:var(--muted);font-size:12px;font-weight:700}
.sales-dispatch-print-size select{padding:7px 9px;border:1px solid var(--line);border-radius:5px;background:#fff;font:inherit;font-weight:400;color:var(--ink)}

/* SKU 商品详情卡：字号收敛 + 小屏对齐（0.10.315）
   原屏幕样式 h1 28px / 金额 34px / dd 16px 在 13~14 寸屏上明显偏大，且规格块固定两列会错位。 */
.inventory-detail-card { padding: 12px; }
.inventory-detail-card-frame { min-height: 420px; }
.inventory-detail-card-copy header { padding: 16px 16px 8px; }
.inventory-detail-card-copy h1 { font-size: 22px; }
.inventory-detail-card-copy header p, .inventory-detail-card-copy header strong { font-size: 13px; }
.inventory-detail-card-copy dt { font-size: 13px; }
.inventory-detail-card-copy dd { font-size: 14px; }
.inventory-detail-card-copy dl div { min-height: 52px; padding: 0 12px; }
.inventory-detail-card-copy footer { padding: 12px 16px; }
.inventory-detail-card-copy footer strong { font-size: 26px; }
.inventory-detail-specifications { gap: 6px; padding: 8px 12px; }
.inventory-detail-specifications span { gap: 1px; font-size: 11px; }
.inventory-detail-specifications b { color: var(--ink); }
.inventory-detail-specifications .inventory-spec-selling { color: #b42318; font-style: normal; font-weight: 700; }
@media (max-width: 1100px) {
  .inventory-detail-specifications { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 900px) {
  .inventory-detail-card { padding: 8px; }
  .inventory-detail-card-frame { min-height: 0; grid-template-columns: minmax(0,1fr); }
  .inventory-detail-card-image { aspect-ratio: 1 / 1; padding: 12px; }
  .inventory-detail-card-copy h1 { font-size: 20px; }
  .inventory-detail-card-copy dl { grid-template-columns: minmax(0,1fr); }
  .inventory-detail-card-copy dl div:nth-child(odd) { border-right: 0; }
  .inventory-detail-card-copy footer strong { font-size: 21px; }
}

/* 编号输入提示行必须是正常文档流的一块并占住行高，
   否则后面的「上一件销售/上一件待确认」标题会压上来。 */
.inventory-scan-form { align-content: start; }
.inventory-scan-form > .inventory-scan-input-status {
  grid-column: 1 / -1;
  position: static;
  display: block;
  float: none;
  margin: 2px 0 0;
  min-height: 20px;
  line-height: 1.5;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.inventory-scan-controller, .inventory-scan-controller > * { overflow: visible; }

/* 编号输入提示行与下一块之间保留间距。 */
.inventory-scan-form { padding-bottom: 28px !important; }
.inventory-scan-input-status { min-height: 20px !important; }
.live-scan-previous, [data-previous-scan-block], .live-scan-outcome { margin-top: 0 !important; }

/* 防止当前销售区压住编号输入提示。 */
.live-scan-current { position: static !important; margin-top: 0 !important; }

/* 收紧编号输入区，给商品信息保留空间。 */
.inventory-scan-form { gap: 8px !important; padding-bottom: 10px !important; }
.inventory-scan-form > label.full { font-size: 13px !important; line-height: 1.35 !important; margin: 0 !important; }
.inventory-scan-form input[name="scan_code"] { min-height: 46px !important; font-size: 20px !important; }
.inventory-scan-input-status { min-height: 16px !important; margin: 2px 0 0 !important; font-size: 12px !important; }
.inventory-hang-tag-number-zone { padding: 6px 4px; }
.inventory-hang-tag-number-line { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; max-width: 100%; min-width: 0; }
.inventory-hang-tag-number-label { margin: 0 !important; flex: 0 0 auto; color: #475569; font: 700 12px/1 Arial, sans-serif; letter-spacing: 3px; }
.inventory-hang-tag-number-value { margin: 0 !important; flex: 0 0 auto; color: #0b0f14; font: 800 52px/1 Arial, sans-serif; letter-spacing: 2px; }

.capture-native-source-note { display: flex; flex-direction: column; gap: 3px; margin: 12px 0; padding: 10px 12px; border: 1px solid #d8e0ea; border-radius: 8px; background: #f7f9fc; color: #526174; }
.capture-native-source-note strong { color: #172033; font-size: 14px; }
.capture-native-source-note span { font-size: 12px; }
.capture-session-lock { display: grid; gap: 3px; min-width: min(360px, 42vw); padding: 8px 12px; border: 1px solid #cbd7e5; border-radius: 8px; background: #f7f9fc; }
.capture-session-lock strong { color: #172033; font-size: 13px; }
.capture-session-lock span { color: #25344a; font-size: 13px; font-weight: 700; }
.capture-session-lock small { color: #64748b; font-size: 11px; }
.capture-session-picker { display: grid; gap: 3px; min-width: min(360px, 42vw); }
.capture-session-picker label { display: grid; gap: 4px; color: #172033; font-size: 13px; font-weight: 700; }
.capture-session-picker select { min-width: 0; max-width: 100%; padding: 8px 32px 8px 10px; border: 1px solid #cbd7e5; border-radius: 7px; background: #f7f9fc; color: #25344a; font: inherit; font-size: 12px; }
.capture-session-picker span, .capture-session-picker small { color: #64748b; font-size: 11px; }
.capture-review-panel { display: grid; gap: 12px; }
.capture-review-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.capture-review-metric { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid #dbe4ee; border-radius: 7px; background: #f8fafc; color: #27364a; font-size: 12px; }
.capture-review-metric strong { color: #132238; font-variant-numeric: tabular-nums; }
.capture-review-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.capture-review-columns > div { min-width: 0; padding: 10px 12px; border: 1px solid #e1e8f0; border-radius: 7px; background: #fbfcfe; }
.capture-review-columns ul { margin: 7px 0 0 18px; padding: 0; color: #526174; font-size: 12px; line-height: 1.6; }
@media (max-width: 760px) { .capture-review-metrics, .capture-review-columns { grid-template-columns: 1fr; } }
.capture-review-headline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.capture-review-headline > span { flex: 0 0 auto; padding: 4px 8px; border: 1px solid #e6bd67; border-radius: 999px; background: #fff9e8; color: #8a5c00; font-size: 12px; }
.capture-review-evidence { display: block; width: 100%; max-height: 340px; object-fit: contain; border: 1px solid #dbe4ee; border-radius: 7px; background: #111820; }
.capture-task-panel { display: grid; gap: 8px; margin-top: 12px; padding: 12px; border: 1px solid #dbe4ee; border-radius: 8px; background: #fbfcfe; }
.capture-task-panel > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.capture-task-panel > header small { color: #667085; font-size: 12px; }
.capture-task-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-width: 0; padding: 8px; border: 1px solid #e1e8f0; border-radius: 7px; background: #fff; }
.capture-task-preview { display: grid; place-items: center; width: 52px; height: 38px; overflow: hidden; border-radius: 5px; background: #eef2f6; color: #7b8794; }
.capture-task-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.capture-task-copy { display: grid; min-width: 0; gap: 3px; }
.capture-task-copy strong, .capture-task-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.capture-task-copy strong { color: #243247; font-size: 12px; }
.capture-task-copy small { color: #667085; font-size: 11px; }
.capture-task-actions { display: flex; justify-content: flex-end; }
@media (max-width: 700px) { .capture-task-panel > header { align-items: flex-start; flex-direction: column; gap: 3px; } .capture-task-row { grid-template-columns: 44px minmax(0, 1fr); } .capture-task-preview { width: 44px; height: 34px; } .capture-task-actions { grid-column: 1 / -1; justify-content: stretch; } .capture-task-actions .secondary-button { width: 100%; } }
.native-livestream-capture-tool [data-capture-native-video], .native-livestream-capture-tool [data-capture-image] { display: block; width: 100%; height: 100%; object-fit: contain; }
.native-livestream-capture-tool [data-capture-native-video][hidden], .native-livestream-capture-tool [data-capture-image][hidden] { display: none; }

/* 本地直播画面采集关闭弹窗后仍保持可见任务状态。 */
[data-open-livestream-capture].live-capture-working { color: #a22a2a; border-color: #d88989; background: #fff8f8; }
[data-capture-working-indicator] { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #cf3030; animation: live-capture-working-blink 1s ease-in-out infinite; }
[data-capture-working-indicator][hidden] { display: none; }
@keyframes live-capture-working-blink { 50% { opacity: .25; transform: scale(.78); } }
.live-capture-dock { position: fixed; right: 22px; bottom: 18px; z-index: 1200; display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 32px)); padding: 10px 12px; border: 1px solid #e0a1a1; border-left: 4px solid #cf3030; border-radius: 8px; background: #fff8f8; box-shadow: 0 10px 28px #1f293733; color: #263244; }
.live-capture-dock .capture-rec-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: #cf3030; animation: live-capture-working-blink 1s ease-in-out infinite; }
.live-capture-dock-copy { min-width: 0; display: grid; gap: 2px; }
.live-capture-dock-copy strong { font-size: 12px; }
.live-capture-dock-copy small, .live-capture-dock-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: #667085; }
.live-capture-dock .secondary-button { flex: 0 0 auto; }
@media (max-width: 700px) { .live-capture-dock { right: 10px; bottom: 10px; left: 10px; max-width: none; } .live-capture-dock .secondary-button { padding-inline: 8px; } }
/* Automatic paid collection requires an explicit mode selection. */
.collection-mode-controls{display:flex;flex-wrap:wrap;align-items:center;gap:4px;max-width:220px}
.collection-mode-controls small{flex-basis:100%;font-size:11px;color:#64748b}
.collection-mode-controls .collection-mode-selected{background:#e8f5ee;color:#12633c;border-color:#4b9b70;font-weight:700}
.monitor-leaf-actions:has(.collection-mode-controls),.row-actions:has(.collection-mode-controls){flex-wrap:wrap}

/* Inventory editor: scoped rules must outrank the generic form grid. */
#inventory-item-form { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px 12px; }
#inventory-item-form > label { min-width:0; }
#inventory-item-form input,#inventory-item-form select { margin-top:4px; min-height:34px; padding:7px 9px; }
#inventory-item-form .inventory-auto-intake { margin:0; padding:8px 10px; }
#inventory-item-form .inventory-auto-intake .upload-box { display:grid; grid-template-columns:20px minmax(0,1fr) minmax(180px,1fr); align-items:center; gap:8px; padding:6px 8px; min-height:0; }
#inventory-item-form .upload-box { margin-top:0; }
#inventory-item-form .upload-box input[type="file"] { margin:0; grid-column:auto; }
#inventory-item-form .inventory-card-image-upload { grid-template-columns:64px minmax(0,1fr); gap:6px 10px; margin:0; }
#inventory-item-form #inventory-image-preview,#inventory-item-form .replenishment-image-preview,#inventory-item-form .replenishment-image-placeholder { width:64px; height:64px; }
#inventory-item-form .inventory-card-image-upload .upload-box { display:grid; grid-template-columns:minmax(0,1fr) minmax(180px,1fr); align-items:center; gap:8px; min-height:0; padding:6px 8px; }
#inventory-item-form .inventory-card-image-upload .upload-box > i { display:none; }
#inventory-item-form .inventory-card-image-upload .upload-box small { display:block; font-size:10px; line-height:1.3; }
#inventory-item-form .inventory-image-quality { font-size:10px; }
#inventory-item-form .inventory-specifications-editor { padding:8px 10px; }
@media(max-width:760px){#inventory-item-form{grid-template-columns:repeat(2,minmax(0,1fr));}#inventory-item-form .inventory-auto-intake .upload-box{grid-template-columns:20px minmax(0,1fr);}#inventory-item-form .inventory-auto-intake input[type="file"]{grid-column:1/-1;}#inventory-item-form .inventory-card-image-upload .upload-box{grid-template-columns:1fr;}}
@media(max-width:480px){#inventory-item-form{grid-template-columns:1fr;}}
