:root {
  color-scheme: light;
  --ink: #1d2b39;
  --muted: #788692;
  --quiet: #a6b0b8;
  --line: #e7ecef;
  --canvas: #f4f6f7;
  --white: #fff;
  --blue: #2186d3;
  --blue-soft: #eaf4fb;
  --green: #16865f;
  --green-soft: #eaf5ef;
  --amber: #c57832;
  --amber-soft: #fff3e7;
  --red: #c66155;
  --radius: 10px;
  --font: "HarmonyOS Sans SC", "MiSans", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #e9edef; }
body { margin: 0; color: var(--ink); font-family: var(--font); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, select { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.phone-app { width: min(100%, 430px); min-height: 100dvh; margin: 0 auto; background: var(--canvas); position: relative; box-shadow: 0 0 45px rgba(20, 39, 52, .08); padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
.status-bar { height: 32px; padding: 7px 20px 0; display: flex; align-items: flex-start; justify-content: space-between; background: var(--white); color: #141b21; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.status-icons { display: flex; align-items: center; gap: 5px; height: 15px; }
.status-icons svg { width: 17px; height: 14px; color: #18202a; fill: currentColor; }
.status-icons .battery { width: 24px; height: 16px; }
.app-header { background: var(--white); min-height: 62px; padding: 7px 20px 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #f0f2f3; }
.header-copy { min-width: 0; }
.eyebrow { color: var(--muted); text-transform: uppercase; font-size: 10px; line-height: 1.1; font-weight: 700; letter-spacing: 0; margin: 0 0 3px; }
h1 { font-size: 22px; line-height: 1.2; margin: 0; font-weight: 720; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); background: var(--white); border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer; color: #5c6974; flex: 0 0 auto; }
.icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:active { background: var(--blue-soft); color: var(--blue); }
.icon-button--small { width: 34px; height: 34px; }

#mainContent { padding: 0 14px 18px; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 12px 0 11px; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: #edf1f3; }
.mode-button { min-height: 36px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 650; cursor: pointer; }
.mode-button.is-active { background: var(--white); color: var(--blue); box-shadow: 0 1px 3px rgba(22, 41, 55, .09); }
.period-section { margin: 0 -14px; padding: 0 14px 11px; background: var(--white); border-bottom: 1px solid var(--line); }
.period-scroll { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding: 0 0 9px; }
.period-scroll::-webkit-scrollbar { display: none; }
.period-chip { flex: 0 0 auto; min-width: 54px; height: 31px; padding: 0 10px; border: 1px solid transparent; border-radius: 7px; background: #f2f5f6; color: #62717e; font-size: 12px; cursor: pointer; }
.period-chip.is-active { color: var(--blue); background: var(--blue-soft); border-color: #cfe5f5; font-weight: 700; }
.range-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.data-freshness { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.data-freshness i, .team-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); display: inline-block; }
.sample-note { display: flex; align-items: center; gap: 8px; padding: 11px 2px 8px; color: var(--muted); font-size: 11px; }
.sample-mark { color: #5c6c78; border: 1px solid #d9e0e4; background: #fff; border-radius: 4px; padding: 3px 6px; font-size: 10px; font-weight: 700; }

.coach-note { position: relative; display: flex; align-items: center; gap: 8px; height: 38px; overflow: hidden; margin: 8px 0 10px; padding: 0 9px 0 11px; border-radius: 5px; background: #ad2d32; color: #fff; }
.coach-note::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: #ffd66f; }
.coach-note-label { flex: 0 0 auto; padding-right: 8px; border-right: 1px solid rgba(255,226,148,.42); color: #ffe294; font-size: 10px; line-height: 1; font-weight: 750; white-space: nowrap; }
.coach-note-viewport { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.coach-note-track { display: flex; width: max-content; animation: coach-marquee var(--coach-duration, 48s) linear infinite; }
.coach-note-copy { display: flex; flex: 0 0 auto; align-items: center; gap: 18px; padding-right: 18px; white-space: nowrap; }
.coach-note-item { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; color: rgba(255,255,255,.96); font-size: 10px; line-height: 1; white-space: nowrap; }
.coach-note-item strong { color: #ffe294; font-size: 10px; font-weight: 750; }
.coach-note-item i { color: #ffe294; font-style: normal; font-size: 13px; }
@keyframes coach-marquee { to { transform: translateX(-50%); } }

.effective-panel { border: 1px solid #cce7d9; border-left: 4px solid var(--green); border-radius: var(--radius); background: var(--white); padding: 14px 15px 12px; }
.effective-topline, .effective-row, .rate-foot { display: flex; align-items: center; justify-content: space-between; }
.count-period { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.metric-open-hint { color: var(--blue); font-size: 10px; }
.metric-kicker { display: inline-flex; align-items: center; gap: 7px; color: #426a59; font-size: 12px; font-weight: 700; }
.metric-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: 0 0 auto; }
.dot-amber { background: var(--amber); }
.dot-gray { background: #a5afb7; }
.dot-blue { background: var(--blue); }
.effective-row { justify-content: flex-start; gap: 16px; margin-top: 4px; }
.effective-count-button { display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto; padding: 0; border: 0; background: transparent; color: var(--green); text-align: left; cursor: pointer; }
.effective-count-button > strong { color: var(--green); font-size: 40px; line-height: 1.15; font-weight: 760; font-variant-numeric: tabular-nums; }
.effective-count-button:focus-visible, .team-ineffective-action:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 3px; }
.effective-side { display: flex; flex-direction: column; gap: 3px; padding-top: 4px; color: var(--muted); font-size: 11px; }
.effective-side b { color: var(--ink); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.team-ineffective-action { display: inline-flex; align-items: baseline; gap: 3px; padding: 0; border: 0; background: transparent; color: #a96022; font-size: 11px; text-align: left; white-space: nowrap; cursor: pointer; }
.team-ineffective-action b { color: #a96022; }
.team-ineffective-action span { color: inherit; }
.rate-track { height: 5px; background: #e9efec; border-radius: 5px; overflow: hidden; margin: 10px 0 7px; }
.rate-track span { display: block; width: 0; height: 100%; background: var(--green); border-radius: inherit; transition: width .25s ease; }
.rate-foot { color: var(--muted); font-size: 10px; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.metric-tile { min-width: 0; min-height: 84px; padding: 10px 11px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); display: grid; grid-template-columns: 1fr auto; align-content: start; gap: 4px 5px; text-align: left; cursor: pointer; }
.metric-tile:active { border-color: #c4ddec; }
.tile-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.metric-tile > strong { grid-column: 1 / 2; font-size: 22px; line-height: 1.15; font-weight: 720; font-variant-numeric: tabular-nums; }
.metric-tile small { grid-column: 1 / 3; color: var(--quiet); font-size: 10px; line-height: 1.2; }
.metric-tile--pending > strong { color: var(--blue); }
.metric-tile--customers > strong, .metric-tile--stock > strong { color: var(--blue); }

.chart-section, .detail-section, .team-list-section, .risk-section { background: var(--white); border-top: 1px solid var(--line); margin: 13px -14px 0; padding: 14px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.section-heading h2 { margin: 0; font-size: 15px; font-weight: 720; line-height: 1.35; }
.section-heading p { color: var(--muted); margin: 3px 0 0; font-size: 10px; }
.text-button, .sort-button { border: 0; background: transparent; color: var(--blue); font-size: 11px; cursor: pointer; padding: 6px 1px 6px 8px; white-space: nowrap; }
.text-button span { font-size: 18px; vertical-align: -1px; margin-left: 2px; }
.chart-legend { display: flex; gap: 14px; margin: 12px 0 2px; color: var(--muted); font-size: 10px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-line { width: 15px; height: 3px; border-radius: 2px; display: inline-block; background: var(--blue); }
.legend-effective { background: var(--green); }
.legend-ineffective { background: var(--amber); }
.chart-wrap { min-height: 164px; position: relative; margin: 3px -3px 0; }
.chart-wrap canvas { width: 100%; height: 164px; display: block; touch-action: pan-y; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.chart-selection { min-height: 27px; padding: 5px 8px; border-radius: 5px; background: #f5f7f8; color: var(--muted); font-size: 10px; }
.single-day-chart { border-radius: 7px; margin: 8px 0; padding: 17px 12px; background: #f5f7f8; display: flex; align-items: center; gap: 11px; color: var(--muted); font-size: 11px; }
.single-day-chart strong { font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }
.single-year-summary { min-height: 148px; padding: 12px 4px 10px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.single-year-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.single-year-head strong { font-size: 16px; }
.single-year-head span { color: var(--muted); font-size: 10px; }
.year-bar-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) 27px; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.year-bar-track { height: 7px; background: #edf0f1; border-radius: 5px; overflow: hidden; }
.year-bar-track i { display: block; height: 100%; border-radius: inherit; }
.year-bar-value { color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }

.daily-report-preview, .team-report-preview { margin-top: 5px; border: 1px solid #e3e9ec; border-left: 3px solid var(--blue); border-radius: 7px; background: #fff; }
.daily-report-lead { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: start; gap: 11px; padding: 12px 11px 10px; }
.daily-report-score { width: 46px; height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid #b9dfcc; border-radius: 50%; background: #f2faf5; color: var(--green); }
.daily-report-score strong { font-size: 19px; line-height: 1; font-variant-numeric: tabular-nums; }
.daily-report-score span { margin-top: 3px; font-size: 8px; line-height: 1; }
.daily-report-score.needs-work { border-color: #edcfc8; background: #fff7f5; color: #b14f43; }
.daily-report-score.steady { border-color: #e9d5b6; background: #fff9ef; color: #a86b23; }
.daily-report-score.missing { border-color: #dce2e5; background: #f6f8f9; color: #83909a; }
.daily-report-judgment, .team-report-judgment { min-width: 0; }
.report-section-label { display: block; margin-bottom: 4px; color: #557181; font-size: 10px; font-weight: 750; }
.daily-report-judgment p, .team-report-judgment p { margin: 0; color: #485963; font-size: 11px; line-height: 1.55; }
.daily-report-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0 10px 10px; }
.daily-report-fact { min-width: 0; min-height: 48px; padding: 7px 8px; border-radius: 5px; background: #f5f7f8; }
.daily-report-fact > span { display: block; color: var(--muted); font-size: 9px; }
.daily-report-fact > strong { display: block; margin-top: 2px; color: var(--ink); font-size: 16px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.daily-report-fact small { margin-left: 3px; color: var(--muted); font-size: 9px; font-weight: 500; }
.daily-report-foot { min-height: 35px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 10px; border-top: 1px solid #edf0f2; }
.daily-report-foot > span { min-width: 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.daily-report-foot .text-button { flex: 0 0 auto; padding-top: 4px; padding-bottom: 4px; font-size: 10px; }
.team-report-judgment { padding: 12px 11px 9px; }
.team-report-judgment > strong { display: block; margin-bottom: 4px; color: #293b48; font-size: 12px; line-height: 1.45; }
.team-report-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; padding: 0 9px 9px; }
.team-report-metric { min-width: 0; min-height: 48px; padding: 6px; border-radius: 5px; background: #f5f7f8; }
.team-report-metric > span { display: block; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.team-report-metric > strong { display: block; margin-top: 3px; color: #344753; font-size: 13px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.team-report-metric.positive > strong { color: var(--green); }
.team-report-metric.warning > strong { color: #a96022; }
.team-report-highlights { padding: 0 10px; }
.team-report-highlight { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 7px; align-items: start; padding: 7px 0; border-top: 1px solid #eef1f2; }
.report-highlight-mark { padding: 3px 4px; border-radius: 3px; background: #eef4f7; color: #5b7381; font-size: 8px; text-align: center; white-space: nowrap; }
.report-highlight-mark.positive { background: var(--green-soft); color: var(--green); }
.report-highlight-mark.warning { background: var(--amber-soft); color: #a96022; }
.team-report-highlight p { margin: 0; color: #63717b; font-size: 9px; line-height: 1.45; }
.team-report-highlight strong { color: #344753; font-weight: 700; }

.detail-section { margin-top: 10px; }
.detail-heading { padding-bottom: 10px; }
.outcome-filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 0 10px; }
.outcome-filters::-webkit-scrollbar { display: none; }
.filter-chip { border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; background: #fff; color: var(--muted); font-size: 10px; white-space: nowrap; cursor: pointer; }
.filter-chip.is-active { color: var(--blue); border-color: #c8e0ef; background: var(--blue-soft); }
.visit-list { border-top: 1px solid #eef1f2; }
.visit-row { width: 100%; min-height: 57px; border: 0; border-bottom: 1px solid #eef1f2; background: transparent; padding: 9px 1px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 7px; text-align: left; cursor: pointer; }
.visit-row:active { background: #f8fafb; }
.visit-identity { display: flex; align-items: center; gap: 8px; min-width: 0; }
.visit-avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto; border-radius: 8px; background: #f0f4f6; color: #657984; font-size: 11px; font-weight: 700; }
.visit-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 650; }
.visit-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.outcome-badge { border-radius: 4px; padding: 4px 6px; background: var(--green-soft); color: var(--green); font-size: 10px; white-space: nowrap; }
.outcome-badge.ineffective { background: var(--amber-soft); color: #a96022; }
.outcome-badge.unclassified { color: #75818b; background: #f0f2f3; }
.visit-chevron { color: #b0bac1; font-size: 18px; line-height: 1; }
.load-more { width: 100%; margin-top: 9px; min-height: 34px; border: 1px solid var(--line); border-radius: 6px; color: var(--blue); background: #fff; font-size: 11px; cursor: pointer; }
.empty-list { padding: 24px 10px; text-align: center; color: var(--muted); font-size: 12px; }

.scope-filters { display: grid; grid-template-columns: 1fr 1.35fr; gap: 7px; margin-bottom: 9px; }
.scope-filters label { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.scope-filters label:last-child { grid-column: 1 / 3; }
.scope-filters label > span { color: var(--muted); font-size: 9px; }
.scope-filters select { width: 100%; height: 35px; min-width: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 0 8px; color: var(--ink); font-size: 11px; }
.team-summary { margin-top: 10px; }
.team-summary-head { display: flex; justify-content: space-between; align-items: center; padding: 0 2px 8px; }
.team-summary-head h2 { margin: 0; font-size: 16px; }
.team-live { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.team-effective-panel { margin: 0; }
.team-metric-grid { margin-top: 8px; }
.team-metric-grid .metric-tile { min-height: 84px; }
.team-metric-grid .metric-tile--static { cursor: default; }
.team-metric-grid .metric-tile--static:active { border-color: var(--line); }
.team-metric-grid .team-stock-button { cursor: pointer; }
.team-metric-grid .team-stock-button:active { border-color: #c4ddec; }
.team-metric-grid .team-involved-button { cursor: pointer; }
.team-metric-grid .team-involved-button:active { border-color: #c4ddec; }
.team-chart-section { margin-top: 10px; }
.team-list-section, .risk-section { margin-top: 10px; }
.sort-button { color: #667681; }
.sales-list { border-top: 1px solid #eef1f2; margin-top: 9px; }
.sales-row { width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid #eef1f2; background: transparent; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; text-align: left; cursor: pointer; }
.sales-row:active { background: #f8fafb; }
.sales-person { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sales-avatar { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #edf4f8; color: #52748a; font-size: 11px; font-weight: 700; }
.sales-name { font-size: 12px; font-weight: 670; }
.sales-branch { color: var(--muted); font-size: 9px; margin-top: 3px; }
.sales-person-meta { min-width: 0; }
.sales-values { text-align: right; }
.sales-values strong { font-size: 16px; color: var(--green); font-variant-numeric: tabular-nums; }
.sales-values span { margin-left: 5px; color: var(--muted); font-size: 10px; }
.sales-secondary { grid-column: 1 / 3; margin-left: 40px; color: var(--muted); font-size: 10px; display: flex; gap: 9px; flex-wrap: wrap; }
.demo-tag { margin-left: 4px; padding: 2px 4px; border-radius: 3px; color: #7d7566; background: #f4f0e9; font-size: 8px; vertical-align: 1px; }
.risk-list { display: grid; gap: 7px; margin-top: 9px; }
.risk-item { width: 100%; border: 1px solid #f0dfcf; border-left: 3px solid var(--amber); border-radius: 6px; background: #fffaf5; text-align: left; padding: 9px 10px; cursor: pointer; }
.risk-item strong { display: block; color: #835930; font-size: 11px; }
.risk-item span { display: block; margin-top: 3px; color: #927f6d; font-size: 10px; line-height: 1.4; }
.risk-empty { border: 1px solid var(--line); border-radius: 6px; padding: 12px; color: var(--muted); font-size: 11px; }

.bottom-nav { height: 63px; position: fixed; z-index: 4; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(100%, 430px); display: grid; grid-template-columns: repeat(5, 1fr); align-items: stretch; border-top: 1px solid #e9edef; background: rgba(255,255,255,.97); backdrop-filter: blur(10px); }
.nav-item { border: 0; background: transparent; color: #8a959e; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; padding: 4px 0 2px; cursor: default; }
.nav-item svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.nav-item--active { color: var(--blue); font-weight: 700; }
.nav-item--active svg { stroke-width: 2; }
.home-indicator { position: fixed; z-index: 5; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 430px); height: calc(16px + env(safe-area-inset-bottom)); background: #fff; display: flex; align-items: flex-start; justify-content: center; padding-top: 5px; }
.home-indicator span { width: 104px; height: 4px; border-radius: 3px; background: #24282c; }
.toast { position: fixed; z-index: 10; bottom: calc(94px + env(safe-area-inset-bottom)); left: 50%; transform: translate(-50%, 8px); opacity: 0; pointer-events: none; padding: 9px 13px; max-width: calc(100vw - 32px); border-radius: 7px; background: rgba(29,43,57,.92); color: #fff; font-size: 11px; transition: opacity .18s ease, transform .18s ease; white-space: nowrap; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.detail-dialog { width: min(394px, calc(100% - 28px)); max-height: min(78dvh, 720px); overflow-y: auto; border: 0; border-radius: 12px; padding: 18px; color: var(--ink); box-shadow: 0 18px 70px rgba(12,28,40,.22); }
.detail-dialog.daily-report-dialog { width: min(414px, calc(100% - 22px)); max-height: min(86dvh, 780px); padding: 19px 16px 20px; border-radius: 9px; }
.detail-dialog::backdrop { background: rgba(16,30,40,.38); }
.detail-dialog form { position: absolute; top: 8px; right: 8px; }
.dialog-close { width: 30px; height: 30px; border: 0; border-radius: 50%; background: #f1f4f5; color: #65727c; font-size: 22px; line-height: 1; cursor: pointer; }
.dialog-title { margin: 4px 35px 4px 0; font-size: 16px; }
.dialog-subtitle { color: var(--muted); font-size: 11px; margin: 0 0 14px; }
.dialog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dialog-cell { padding: 10px; border-radius: 7px; background: #f5f7f8; }
.dialog-cell span { display: block; color: var(--muted); font-size: 10px; }
.dialog-cell strong { display: block; margin-top: 4px; font-size: 17px; }
.dialog-copy { margin: 12px 0 0; color: #596773; font-size: 11px; line-height: 1.6; }
.report-modal-score { display: grid; grid-template-columns: 40px 1fr; align-items: center; column-gap: 8px; margin: 0 0 13px; padding: 9px 10px; border-radius: 6px; background: #f4f7f8; }
.report-modal-score strong { grid-row: 1 / 3; color: var(--green); font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.report-modal-score span { color: #536674; font-size: 10px; font-weight: 700; }
.report-modal-score small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.report-modal-section { padding: 10px 0; border-top: 1px solid #e9edef; }
.report-modal-section h3 { margin: 0 0 5px; color: #304452; font-size: 12px; line-height: 1.4; }
.report-modal-section p, .report-modal-section li { margin: 0; color: #5c6a74; font-size: 10px; line-height: 1.65; overflow-wrap: anywhere; }
.report-modal-section p + p { margin-top: 6px; }
.report-modal-section ul, .report-modal-section ol { margin: 4px 0 0; padding-left: 18px; }
.report-modal-section li + li { margin-top: 4px; }
.report-sample-table { border-top: 1px solid #e9edef; }
.report-sample-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 3px 8px; padding: 8px 0; border-bottom: 1px solid #edf0f2; }
.report-sample-row > span { grid-row: 1 / 3; color: #74818b; font-size: 9px; }
.report-sample-row > strong { min-width: 0; color: #344753; font-size: 10px; overflow-wrap: anywhere; }
.report-sample-row > small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.reason-chart-layout { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.reason-pie { width: 132px; height: 132px; flex: 0 0 auto; display: grid; place-items: center; position: relative; border-radius: 50%; }
.reason-pie::before { content: ""; position: absolute; inset: 29px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px #edf0f2; }
.reason-pie > span { z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); }
.reason-pie strong { color: var(--ink); font-size: 20px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.reason-pie small { font-size: 9px; }
.reason-legend { width: 100%; max-height: 310px; overflow-y: auto; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.reason-legend-row { min-height: 31px; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto 42px; align-items: center; gap: 7px; border-bottom: 1px solid #eef1f2; font-size: 10px; }
.reason-legend-row > i { width: 8px; height: 8px; border-radius: 50%; background: var(--reason-color); }
.reason-legend-row > span { min-width: 0; overflow-wrap: anywhere; }
.reason-legend-row > b { color: var(--muted); font-size: 9px; font-weight: 550; white-space: nowrap; }
.reason-legend-row > strong { text-align: right; font-size: 10px; font-variant-numeric: tabular-nums; }

.visit-detail-toolbar { min-height: 48px; margin: 0 -14px; padding: 7px 14px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; background: #fff; border-bottom: 1px solid var(--line); }
.detail-back { display: inline-flex; align-items: center; gap: 3px; padding: 5px 0; border: 0; background: transparent; color: var(--blue); font-size: 11px; white-space: nowrap; cursor: pointer; }
.detail-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.visit-detail-record { min-width: 0; color: var(--muted); font-size: 10px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.customer-profile { margin: 10px -14px 0; padding: 14px; background: #fff; }
.profile-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.profile-avatar { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: var(--blue-soft); color: var(--blue); font-size: 12px; font-weight: 750; }
.profile-name-wrap { min-width: 0; flex: 1 1 auto; }
.profile-name-wrap h2 { overflow-wrap: anywhere; margin: 0; font-size: 16px; line-height: 1.3; }
.profile-name-wrap p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.intention-badge { flex: 0 0 auto; border: 1px solid transparent; border-radius: 5px; padding: 4px 7px; font-size: 10px; font-weight: 700; }
.intention-high { color: #b94d43; border-color: #f0d5d2; background: #fff5f3; }
.intention-medium { color: #a86b23; border-color: #f1dfc4; background: #fff9ef; }
.intention-low { color: #657984; border-color: #dce5e9; background: #f4f7f8; }
.profile-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; padding-top: 11px; border-top: 1px solid #edf0f2; }
.profile-facts div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.profile-facts span, .followup-field > span { color: var(--muted); font-size: 10px; }
.profile-facts strong { font-size: 12px; font-weight: 650; }
.visit-detail-section, .visit-history-section { margin: 10px -14px 0; padding: 14px; background: #fff; border-top: 1px solid var(--line); }
.detail-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.detail-section-heading h2 { margin: 0; font-size: 14px; line-height: 1.35; }
.detail-section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.visit-sequence { flex: 0 0 auto; color: #617482; font-size: 10px; }
.followup-fields { margin-top: 9px; }
.followup-field { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 8px; padding: 10px 0; border-top: 1px solid #eef1f2; }
.followup-field strong { min-width: 0; color: #344451; font-size: 11px; line-height: 1.55; font-weight: 550; overflow-wrap: anywhere; }
.history-disclaimer { margin: 4px 0 0; padding: 8px 9px; border-radius: 5px; background: #f4f6f7; color: var(--muted); font-size: 10px; line-height: 1.45; }
.followup-timeline { list-style: none; margin: 13px 0 0 4px; padding: 0 0 0 13px; border-left: 1px solid #dfe6e9; }
.timeline-item { position: relative; padding: 0 0 10px 11px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker { position: absolute; top: 16px; left: -18px; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: #98a6ae; box-shadow: 0 0 0 1px #d5dde1; }
.timeline-marker.effective { background: var(--green); box-shadow: 0 0 0 1px #c7dfd2; }
.timeline-marker.ineffective { background: var(--amber); box-shadow: 0 0 0 1px #ecd6c1; }
.timeline-entry { width: 100%; min-width: 0; padding: 8px; border: 0; border-radius: 5px; background: transparent; text-align: left; cursor: pointer; }
.timeline-entry:active { background: #f5f8f9; }
.timeline-item.is-current .timeline-entry { background: #f4f8fa; box-shadow: inset 2px 0 var(--blue); }
.timeline-entry-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.timeline-entry > strong { display: block; margin-top: 7px; color: var(--ink); font-size: 11px; line-height: 1.4; font-weight: 650; }
.timeline-summary, .timeline-next { display: block; margin-top: 5px; color: #596773; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.timeline-next { color: var(--muted); }
.detail-demo-note { margin: 10px 0 2px; color: var(--muted); font-size: 9px; line-height: 1.45; text-align: center; }
.library-history-empty { margin: 12px 0 2px; padding: 16px 10px; background: #f7f9fa; color: var(--muted); font-size: 11px; text-align: center; }

.pending-list-toolbar { min-height: 48px; margin: 0 -14px; padding: 7px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border-bottom: 1px solid var(--line); }
.pending-list-toolbar > span { min-width: 0; color: var(--muted); font-size: 10px; text-align: right; }
.pending-list-summary { margin: 10px -14px 0; padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; background: #fff; border-top: 1px solid var(--line); }
.pending-list-summary h2 { margin: 0; font-size: 16px; line-height: 1.35; }
.pending-list-summary .eyebrow { margin-bottom: 4px; }
.pending-list-summary > p { grid-column: 1 / 3; margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.pending-list-count { display: flex; align-items: baseline; gap: 4px; color: var(--muted); white-space: nowrap; }
.pending-list-count strong { color: var(--blue); font-size: 24px; font-variant-numeric: tabular-nums; }
.pending-list-count span { font-size: 10px; }
.pending-sales-group { margin: 10px -14px 0; padding: 13px 14px 0; background: #fff; border-top: 1px solid var(--line); }
.pending-sales-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 10px; }
.pending-sales-heading h3 { margin: 0; font-size: 12px; font-weight: 700; }
.pending-sales-heading p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.pending-sales-heading > span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.pending-sales-heading > span strong { color: var(--ink); font-size: 12px; font-variant-numeric: tabular-nums; }
.pending-customer-list { border-top: 1px solid #eef1f2; }
.pending-customer-row { width: 100%; min-width: 0; padding: 11px 0; border: 0; border-bottom: 1px solid #eef1f2; background: transparent; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: start; gap: 8px; text-align: left; cursor: pointer; }
.pending-customer-row:active { background: #f8fafb; }
.pending-customer-row > .profile-avatar { width: 34px; height: 34px; border-radius: 8px; font-size: 10px; }
.pending-customer-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pending-customer-top { min-width: 0; display: flex; align-items: center; gap: 6px; }
.pending-customer-top > strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.pending-customer-top .intention-badge { padding: 2px 5px; font-size: 9px; }
.pending-customer-facts { color: var(--muted); font-size: 9px; line-height: 1.35; overflow-wrap: anywhere; }
.pending-customer-last { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; color: #465661; font-size: 10px; line-height: 1.4; }
.pending-customer-last time { color: var(--muted); font-variant-numeric: tabular-nums; }
.pending-customer-last .outcome-badge { padding: 2px 5px; font-size: 9px; }
.pending-customer-last > span:last-child { flex-basis: 100%; }
.pending-customer-next { color: var(--muted); font-size: 9px; line-height: 1.4; overflow-wrap: anywhere; }
.pending-customer-count { display: flex; align-items: center; gap: 3px; padding-top: 2px; color: var(--blue); font-size: 9px; white-space: nowrap; }
.pending-customer-count span { color: #aab5bc; font-size: 17px; line-height: 1; }
.pending-load-more { width: 100%; min-height: 36px; margin: 8px 0 11px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--blue); font-size: 10px; cursor: pointer; }
.pending-empty { margin: 10px -14px 0; padding: 28px 16px; display: flex; flex-direction: column; gap: 6px; background: #fff; border-top: 1px solid var(--line); text-align: center; }
.pending-empty strong { font-size: 12px; }
.pending-empty span { color: var(--muted); font-size: 10px; line-height: 1.45; }

.customer-library-summary { margin: 0 -14px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border-bottom: 1px solid var(--line); }
.customer-library-summary h2 { margin: 0; font-size: 16px; line-height: 1.3; }
.customer-library-summary .eyebrow { margin-bottom: 4px; }
.customer-library-summary > strong { color: var(--blue); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.customer-library-tools { margin: 0 -14px; padding: 11px 14px 12px; background: #fff; border-bottom: 1px solid var(--line); }
.customer-library-search { display: block; }
.customer-library-search input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 6px; padding: 0 11px; background: #f8fafb; color: var(--ink); font: inherit; font-size: 12px; outline: none; }
.customer-library-search input:focus { border-color: #9bc9e6; box-shadow: 0 0 0 2px rgba(33,134,211,.1); }
.customer-library-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 9px; }
.customer-library-filters label { display: block; min-width: 0; }
.customer-library-filters label > span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.customer-library-filters select { width: 100%; height: 35px; min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 0 7px; background: #fff; color: #334552; font-size: 10px; }
.customer-library-list { margin: 10px -14px 0; padding: 0 14px; background: #fff; border-top: 1px solid var(--line); }
.customer-library-row { width: 100%; min-width: 0; min-height: 70px; padding: 10px 0; border: 0; border-bottom: 1px solid #eef1f2; background: transparent; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 8px; text-align: left; cursor: pointer; }
.customer-library-row:active { background: #f8fafb; }
.customer-library-row > .profile-avatar { width: 34px; height: 34px; border-radius: 8px; font-size: 10px; }
.customer-library-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.customer-library-top { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.customer-library-top > strong { max-width: 100%; margin-right: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.customer-library-top .intention-badge { padding: 2px 4px; font-size: 8px; }
.customer-stage-badge { border-radius: 4px; padding: 2px 5px; background: #f1f4f5; color: #60717c; font-size: 8px; white-space: nowrap; }
.customer-stage-badge.stage-pending { color: #a86b23; background: #fff5e8; }
.customer-stage-badge.stage-won { color: var(--green); background: var(--green-soft); }
.customer-library-facts, .customer-library-last { min-width: 0; color: var(--muted); font-size: 9px; line-height: 1.35; overflow-wrap: anywhere; }
.customer-library-last { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.customer-library-last .outcome-badge { padding: 2px 5px; font-size: 8px; }
.customer-library-owner { color: #6f7e88; }
.customer-library-more { margin-bottom: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (min-width: 700px) {
  body { padding: 24px 0; }
  .phone-app { min-height: calc(100dvh - 48px); border-radius: 20px; overflow: hidden; }
  .bottom-nav, .home-indicator { position: absolute; }
  .toast { position: fixed; }
}
@media (max-width: 360px) {
  #mainContent { padding-left: 10px; padding-right: 10px; }
  .period-section, .chart-section, .detail-section, .team-list-section, .risk-section, .pending-list-toolbar, .pending-list-summary, .pending-sales-group, .pending-empty,
  .visit-detail-toolbar, .customer-profile, .visit-detail-section, .visit-history-section { margin-left: -10px; margin-right: -10px; }
  .period-section { padding-left: 10px; padding-right: 10px; }
  .chart-section, .detail-section, .team-list-section, .risk-section, .pending-list-summary, .pending-sales-group { padding-left: 10px; padding-right: 10px; }
  .customer-library-summary, .customer-library-tools { margin-left: -10px; margin-right: -10px; padding-left: 10px; padding-right: 10px; }
  .customer-library-list { margin-left: -10px; margin-right: -10px; padding-left: 10px; padding-right: 10px; }
  .period-chip { padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .coach-note-track { animation: none; }
}
