:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --border: #e2e5ea;
  --text: #1f2430;
  --muted: #6b7280;
  --accent: #2563eb;
  --primary: #2563eb;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #b45309;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.query-wait-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(237, 244, 252, .58);
  backdrop-filter: blur(2px);
}
.query-wait-overlay[hidden] { display: none; }
.query-wait-card {
  display: grid;
  justify-items: center;
  width: min(360px, 100%);
  padding: 27px 30px 25px;
  border: 1px solid #cfe0f7;
  border-radius: 14px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 18px 48px rgba(45, 83, 130, .18);
  text-align: center;
}
.query-wait-spinner {
  width: 34px;
  height: 34px;
  margin-bottom: 15px;
  border: 3px solid #dbeafe;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: query-wait-spin .75s linear infinite;
}
.query-wait-card strong { font-size: 16px; }
.query-wait-card span:last-child { margin-top: 7px; color: var(--muted); font-size: 12px; }
@keyframes query-wait-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .query-wait-spinner { animation-duration: 1.5s; } }
button.is-querying { cursor: wait !important; opacity: .78; }

.app-shell { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: 252px;
  flex: 0 0 252px;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 26px 14px;
  background: #edf4fc;
  border-right: 1px solid #dce7f3;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 12px 25px; color: #146ee8; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(145deg, #2c8bff, #1267df); color: #fff; font-size: 25px; font-weight: 800; box-shadow: 0 5px 12px #9cc6f680; }
.brand strong { display: block; font-size: 17px; line-height: 1.15; letter-spacing: .02em; }
.brand small { display: block; margin-top: 3px; color: #5381b6; font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.product-switch { margin: -10px 0 16px; padding: 10px 11px; border: 1px solid #d9e5f5; border-radius: 10px; background: #f6f9fe; }
.product-switch label { display: block; margin-bottom: 6px; color: #5b7391; font-size: 11px; font-weight: 700; }
.product-switch select { box-sizing: border-box; width: 100%; min-height: 36px; padding: 6px 30px 6px 9px; border: 1px solid #bdd0e8; border-radius: 8px; background: #fff; color: #17365d; font: inherit; font-weight: 700; }
.user-product-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.product-permission-fields { display: flex; gap: 16px; margin: 4px 0 12px; padding: 12px; border: 1px solid #d9e5f5; border-radius: 10px; }
.product-permission-fields legend { padding: 0 5px; color: #5b7391; font-size: 12px; font-weight: 700; }
.product-permission-fields label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 600; }
.account-ownership-form { display: grid; grid-template-columns: repeat(3, minmax(170px, 1fr)); gap: 14px; }
.account-ownership-form label { display: grid; gap: 6px; }
.account-index-field { grid-column: 1 / -1; display: grid; gap: 10px; }
.account-index-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.account-index-toolbar > input[type="search"] { flex: 1 1 280px; }
.account-index-toolbar > select { width: auto; min-width: 150px; }
.account-index-toolbar .account-index-toggle { display: inline-flex; grid-auto-flow: column; align-items: center; gap: 7px; margin: 0; white-space: nowrap; }
.account-index-wrap { max-height: 420px; overflow: auto; border: 1px solid #e1e8f2; border-radius: 10px; }
.account-index-wrap table { margin: 0; }
.account-index-wrap thead { position: sticky; top: 0; z-index: 1; background: #f7faff; }
.account-index-wrap .checkbox-cell { width: 44px; text-align: center; }
.account-index-wrap input[type="checkbox"] { width: 17px; height: 17px; }
.account-self-binding-note { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #cfe0f7; border-radius: 10px; background: #f4f8ff; }
.account-self-binding-note span { color: var(--muted); font-size: 13px; }
.inline-binding-form { display: grid; gap: 8px; min-width: 260px; padding: 10px 0; }
.inline-binding-form + form { padding-bottom: 8px; }
@media (max-width: 800px) { .account-ownership-form { grid-template-columns: 1fr; } }
.sidebar-primary { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 24px; min-height: 48px; border-radius: 11px; background: linear-gradient(180deg, #2a88fa, #1474ed); box-shadow: inset 0 0 0 1px #0b5fc8, 0 3px 7px #9bbde680; color: #fff; font-size: 16px; font-weight: 700; text-decoration: none; }
.sidebar-primary:hover { filter: brightness(1.04); }
.primary-icon { font-size: 20px; line-height: 1; }
.nav-label { padding: 0 12px 8px; color: #6e8198; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.nav-label-lower { margin-top: 27px; }
.account-panel { margin: 28px 6px 0; padding: 11px 12px; border: 1px solid #cadcf1; border-radius: 9px; background: #f6faff; }
.account-panel > div { display: flex; justify-content: space-between; gap: 8px; color: #60758e; font-size: 12px; }
.account-panel strong { max-width: 125px; overflow: hidden; text-overflow: ellipsis; color: #354352; }
.account-panel form { margin-top: 9px; }
.account-panel button { width: 100%; padding: 6px 8px; border: 1px solid #cadcf1; border-radius: 6px; background: #fff; color: #52677f; cursor: pointer; }
.account-panel button:hover { color: var(--accent); border-color: #9fc3ee; }
.sidebar nav { display: flex; flex-direction: column; gap: 6px; }
.sidebar nav .nav-item { display: flex; align-items: center; gap: 13px; padding: 11px 12px; color: #354352; text-decoration: none; border-radius: 9px; font-size: 15px; font-weight: 600; }
.nav-item svg { width: 22px; height: 22px; flex: 0 0 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.sidebar nav .nav-item:hover { color: var(--accent); background: #e2efff; }
.sidebar nav .nav-item.active { color: #126ee5; background: #d4e7ff; font-weight: 750; }
.sidebar a.is-navigating, .metric-tabs a.is-navigating, a[data-page-navigation].is-navigating { cursor: wait; opacity: .72; pointer-events: none; }
.sidebar a.is-navigating::after { margin-left: auto; color: var(--accent); content: "跳转中…"; font-size: 10px; font-weight: 700; white-space: nowrap; }
.nested-nav { gap: 3px !important; }
.nav-parent { display: flex; align-items: center; gap: 13px; padding: 8px 12px 6px; color: #354352; font-size: 15px; font-weight: 750; }
.nav-group { display: flex; flex-direction: column; gap: 3px; }
.nav-group-toggle { width: 100%; border: 0; border-radius: 9px; background: transparent; font-family: inherit; text-align: left; cursor: pointer; }
.nav-group-toggle:hover, .nav-group.active > .nav-group-toggle { color: var(--accent); background: #eef4ff; }
.nav-children { display: flex; flex-direction: column; gap: 3px; }
.nav-children[hidden] { display: none !important; }
.nav-chevron { width: 8px; height: 8px; margin-left: auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .16s ease; }
.nav-group-toggle[aria-expanded="true"] .nav-chevron { transform: rotate(225deg); }
.nav-parent svg { width: 22px; height: 22px; flex: 0 0 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.sidebar nav .nav-child { position: relative; min-height: 34px; margin-left: 34px; padding: 7px 10px 7px 16px; font-size: 13px; }
.sidebar nav .nav-child::before { position: absolute; left: 3px; top: 0; bottom: 0; width: 1px; background: #c7d8eb; content: ""; }
.sidebar nav .nav-child.active::before { width: 2px; background: var(--accent); }
.sidebar nav .nav-child.disabled { justify-content: space-between; color: #8b98a7; cursor: default; }
.sidebar nav .nav-child.disabled small { padding: 2px 5px; border-radius: 999px; background: #dfe8f2; font-size: 9px; font-weight: 650; }

.container {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 100vh;
  margin: 0;
  padding: 24px clamp(18px, 2vw, 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

h1 { font-size: 20px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
h3 { font-size: 14px; color: var(--muted); margin: 18px 0 8px; }

.muted { color: var(--muted); font-size: 13px; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .06em; margin-bottom: 6px; }

.date-form { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.date-form input[type=date] { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; }
.date-form button { padding: 6px 14px; border: none; border-radius: 6px; background: var(--accent); color: #fff; cursor: pointer; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 14px; }
.stat-tile { background: var(--bg); border-radius: 8px; padding: 12px 14px; }
.stat-tile .label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.stat-tile .value { font-size: 18px; font-weight: 700; }
.stat-tile .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { color: var(--muted); font-weight: 600; font-size: 12px; }
tfoot th { padding-top: 10px; padding-bottom: 10px; border-top: 2px solid #cbd5e1; background: #f8fafc; color: var(--text); font-size: 13px; font-weight: 750; }
.summary-row .pos { color: var(--green); }
.summary-row .neg { color: var(--red); }
.table-wrap { overflow-x: auto; }

.pos { color: var(--green); }
.neg { color: var(--red); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.met { background: #dcfce7; color: var(--green); }
.badge.unmet { background: #fee2e2; color: var(--red); }

.target-rows { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.target-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--bg); border-radius: 8px; }
.target-row .name { font-weight: 600; font-size: 13px; }
.target-row .detail { font-size: 12px; color: var(--muted); }

.profit-hero { padding: 24px 26px; border-color: #cfe0f7; background: linear-gradient(135deg, #fff 0%, #f7fbff 65%, #edf6ff 100%); }
.profit-hero-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.profit-hero-heading h2 { margin: 0; padding: 0; border: 0; font-size: 19px; }
.profit-as-of { color: var(--muted); font-size: 12px; }
.profit-hero-main { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(360px, 1.6fr); gap: 42px; align-items: center; padding: 25px 0 22px; }
.profit-label { color: var(--muted); font-size: 13px; font-weight: 650; }
.profit-amount { margin: 5px 0 2px; font-size: clamp(34px, 4vw, 48px); line-height: 1.15; font-weight: 800; letter-spacing: -.03em; }
.profit-daily { color: var(--muted); font-size: 12px; }
.profit-completion-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.profit-completion-top strong { color: var(--text); font-size: 22px; }
.profit-progress-track { height: 14px; overflow: hidden; border-radius: 999px; background: #dfe8f3; box-shadow: inset 0 1px 2px #8aa0ba25; }
.profit-progress-fill { display: block; height: 100%; border-radius: inherit; transition: width .35s ease; }
.profit-progress-fill.status-completed, .profit-progress-fill.status-ahead { background: linear-gradient(90deg, #16a34a, #22c55e); }
.profit-progress-fill.status-ontrack { background: linear-gradient(90deg, #1474ed, #3b82f6); }
.profit-progress-fill.status-slow { background: linear-gradient(90deg, #d97706, #f59e0b); }
.profit-progress-fill.status-risk { background: linear-gradient(90deg, #dc2626, #f05252); }
.profit-progress-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.profit-pace { display: flex; align-items: center; gap: 8px; margin-top: 13px; font-size: 12px; }
.profit-pace strong { padding: 3px 8px; border-radius: 999px; }
.profit-pace.status-completed strong, .profit-pace.status-ahead strong { color: #15803d; background: #dcfce7; }
.profit-pace.status-ontrack strong { color: #1d4ed8; background: #dbeafe; }
.profit-pace.status-slow strong { color: #b45309; background: #fef3c7; }
.profit-pace.status-risk strong { color: #b91c1c; background: #fee2e2; }
.profit-pace span { color: var(--muted); }
.profit-support-grid { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid #dbe7f5; border-bottom: 1px solid #dbe7f5; }
.profit-support-grid > div { padding: 15px 14px; border-right: 1px solid #dbe7f5; }
.profit-support-grid > div:first-child { padding-left: 0; }
.profit-support-grid > div:last-child { border-right: 0; }
.profit-support-grid span, .profit-support-grid strong { display: block; }
.profit-support-grid span { margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.profit-support-grid strong { font-size: 15px; }
.profit-target-settings { margin-top: 14px; color: var(--muted); font-size: 12px; }
.profit-target-settings summary { width: fit-content; color: var(--accent); cursor: pointer; font-weight: 650; }
.profit-target-settings form { display: flex; align-items: center; gap: 9px; margin-top: 10px; }
.profit-target-settings form > div { display: flex; align-items: center; overflow: hidden; border: 1px solid var(--border); border-radius: 7px; background: #fff; }
.profit-target-settings form > div span { padding-left: 10px; color: var(--muted); }
.profit-target-settings input { width: 150px; padding: 8px; border: 0; outline: 0; font: inherit; }
.profit-target-settings button { align-self: stretch; padding: 0 13px; border: 0; background: var(--accent); color: #fff; cursor: pointer; font-weight: 650; }
.feedback-nav-parent { margin-top: 6px; padding-top: 12px; border-top: 1px solid #dbe4ef; }
.feedback-heading-actions { display: flex; align-items: center; gap: 8px; }
.feedback-input-card textarea, .feedback-preview-table textarea { width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid var(--border); border-radius: 7px; color: var(--text); font: inherit; resize: vertical; }
.feedback-input-card form > textarea { margin-top: 8px; min-height: 260px; line-height: 1.65; }
.feedback-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 14px; }
.feedback-form-actions button { padding: 9px 16px; border: 0; border-radius: 7px; background: var(--accent); color: #fff; cursor: pointer; font-weight: 700; }
.feedback-form-actions a { color: var(--muted); text-decoration: none; font-size: 13px; }
.feedback-preview-table input[type=text], .feedback-preview-table select { min-width: 145px; padding: 8px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--text); }
.feedback-preview-table textarea { min-width: 300px; }
.feedback-name-field { display: grid; grid-template-columns: 150px minmax(260px, 520px); align-items: center; gap: 12px; margin: 14px 0; color: var(--muted); font-size: 13px; }
.feedback-name-field input, .feedback-record-actions input, .feedback-history-filters input { box-sizing: border-box; padding: 9px 10px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--text); font: inherit; }
.feedback-status { display: inline-block; padding: 3px 8px; border-radius: 999px; white-space: nowrap; font-size: 11px; font-weight: 700; }
.feedback-status.status-parsed, .feedback-status.status-matched { color: #15803d; background: #dcfce7; }
.feedback-status.status-review, .feedback-status.status-partial { color: #b45309; background: #fef3c7; }
.feedback-status.status-missing, .feedback-status.status-unmatched { color: #b91c1c; background: #fee2e2; }
.feedback-summary-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 14px; }
.feedback-summary-grid > div { padding: 14px; border-radius: 9px; background: var(--bg); }
.feedback-summary-grid span, .feedback-summary-grid strong { display: block; }
.feedback-summary-grid span { color: var(--muted); font-size: 11px; }
.feedback-summary-grid strong { margin-top: 4px; font-size: 22px; }
.feedback-aggregate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.feedback-aggregate-grid .card { min-width: 0; }
.feedback-issue-cell { min-width: 240px; max-width: 420px; white-space: normal; line-height: 1.5; }
.feedback-phone-list { min-width: 125px; white-space: normal; }
.feedback-phone-list span { display: block; font-variant-numeric: tabular-nums; white-space: nowrap; }
.feedback-record-actions { display: flex; gap: 8px; max-width: 620px; margin-top: 14px; }
.feedback-record-actions input { flex: 1; }
.feedback-record-actions button, .feedback-history-filter-actions button { padding: 8px 13px; border: 0; border-radius: 7px; background: var(--accent); color: #fff; cursor: pointer; font-weight: 700; }
.feedback-table-title { display: flex; align-items: center; gap: 10px; }
.feedback-table-title h2 { margin: 0; }
.copy-table-button { padding: 6px 10px; border: 1px solid #bfdbfe; border-radius: 6px; background: #eff6ff; color: #1d4ed8; cursor: pointer; white-space: nowrap; font-size: 12px; font-weight: 700; }
.feedback-danger-zone { display: flex; justify-content: flex-end; margin: -4px 0 16px; }
.feedback-danger-zone button, .table-actions form button { border: 0; background: transparent; color: #b91c1c; cursor: pointer; font: inherit; }
.feedback-history-filters { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr auto; align-items: end; gap: 12px; }
.feedback-history-filters label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.feedback-history-filter-actions { display: flex; align-items: center; gap: 10px; padding-bottom: 1px; }
.feedback-history-filter-actions a, .feedback-history-name, .table-actions a { color: var(--accent); text-decoration: none; }
.table-actions { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.table-actions form { margin: 0; }
@media (max-width: 1000px) { .feedback-history-filters { grid-template-columns: 1fr 1fr; } }
.audience-account-filter { align-items: end; }
.audience-account-field { display: grid; gap: 6px; min-width: 230px; color: var(--muted); font-size: 12px; }
.audience-account-select > summary { min-height: 38px; box-sizing: border-box; }
.audience-account-select > div { width: 260px; max-height: none; overflow: hidden; }
.audience-account-select .multi-filter-search { position: sticky; top: 0; z-index: 2; }
.audience-account-select .select-all-option { position: sticky; top: 43px; z-index: 2; background: #fff; }
.audience-account-select .multi-filter-options { max-height: 280px; overflow-y: auto; }
.audience-account-select label { justify-content: flex-start; }
.audience-account-select [data-account-option][hidden] { display: none; }
.audience-account-select [data-account-search-empty][hidden] { display: none; }
.audience-account-select label span { min-width: 0; flex: 0 1 auto; text-align: left; }
.audience-account-select label input[type="checkbox"] { flex: 0 0 auto; margin: 0; }
.audience-account-select label strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audience-output-heading { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.audience-output-heading h3 { margin: 0 0 5px; }
.audience-breakdown-placeholder { margin-top: 18px; }
.audience-breakdown-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 16px; }
.audience-breakdown-card { min-width: 0; padding: 15px; border: 1px solid var(--border); border-radius: 9px; background: #fbfdff; }
.audience-breakdown-card h3 { margin: 0 0 10px; font-size: 15px; }
.audience-breakdown-card table { table-layout: fixed; }
.audience-breakdown-card th:first-child, .audience-breakdown-card td:first-child { width: 22%; }
.lead-period-filter { margin-top: 16px; }
.analysis-filter .kol-form-action { display: inline-flex; align-items: center; align-self: flex-end; justify-content: center; box-sizing: border-box; min-height: 40px; }
.analysis-subnav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.kol-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kol-import-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.kol-daily-table, .kol-city-table { min-width: 1050px; }
.kol-daily-table td:first-child, .kol-city-table td:first-child { white-space: nowrap; }
.table-subline { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 400; }
.kol-detail-table td:nth-child(2) { min-width: 180px; }
.kol-detail-table td:nth-child(3) { min-width: 92px; }
.lead-alert-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.lead-alert { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; padding: 11px 12px; border-left: 3px solid #94a3b8; border-radius: 8px; background: #f8fafc; }
.lead-alert span { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.lead-alert strong { font-size: 13px; }
.lead-alert em { color: var(--muted); font-size: 12px; font-style: normal; font-weight: 700; white-space: nowrap; }
.lead-alert.warning { border-color: #ef4444; background: #fff7f7; }
.lead-alert.warning strong, .lead-alert.warning em { color: #b91c1c; }
.lead-alert.positive { border-color: #22c55e; background: #f4fcf6; }
.lead-alert.positive strong, .lead-alert.positive em { color: #15803d; }
.lead-alert.neutral { border-color: #3b82f6; background: #f5f9ff; }
.lead-alert.neutral strong, .lead-alert.neutral em { color: #1d4ed8; }
.lead-trend-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kol-trend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lead-trend-grid .card { position: relative; min-width: 0; }
.lead-quality-chart-card { grid-column: 1 / -1; }
.lead-trend-toolbar { display: flex; justify-content: flex-end; margin: 4px 0 10px; }
.lead-trend-toolbar label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 650; }
.lead-trend-toolbar select { min-width: 190px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--text); font: inherit; }
.lead-chart-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; border-bottom: 1px solid var(--border); }
.lead-chart-heading h2 { margin: 0; border: 0; }
.lead-trend-chart { display: block; width: 100%; height: 210px; }
.lead-chart-tooltip { position: absolute; z-index: 3; display: none; min-width: 150px; padding: 7px 9px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; box-shadow: 0 6px 18px #1f293726; color: var(--text); font-size: 12px; font-weight: 650; pointer-events: none; }
.lead-chart-tooltip.visible { display: block; }
.lead-chart-tooltip { white-space: pre-line; max-width: min(360px, 90vw); font-weight: 500; line-height: 1.5; }
.kol-chart { cursor: crosshair; }
.kol-trend-grid .lead-chart-tooltip { display: block; visibility: hidden; opacity: 0; transform: translateY(5px); transition: opacity .14s ease, transform .14s ease, visibility .14s; }
.kol-trend-grid .lead-chart-tooltip.visible { visibility: visible; opacity: 1; transform: translateY(0); }
.lead-series-current::before { background: #2563eb !important; }
.lead-series-yesterday::before { background: #f59e0b !important; }
.lead-series-week::before { background: #8b5cf6 !important; }
.lead-hourly-note { grid-column: 1 / -1; margin: 0 0 4px; }
.lead-hourly-note button { cursor: pointer; }
.lead-hourly-status { display: block; min-height: 48px; margin: -2px 0 8px; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.lead-chart-legend { display: flex; flex-wrap: wrap; gap: 12px; margin: -4px 0 8px; color: var(--muted); font-size: 11px; }
.lead-chart-legend span::before { display: inline-block; width: 9px; height: 3px; margin-right: 5px; vertical-align: middle; border-radius: 3px; background: #94a3b8; content: ""; }
.lead-chart-legend .series-created::before, .lead-chart-legend .series-rate::before { background: #2563eb; }
.lead-chart-legend .series-valid::before { background: #16a34a; }
.lead-chart-legend .series-cost::before { background: #f59e0b; }
.lead-chart-legend .series-valid-cost::before, .lead-chart-legend .series-older::before { background: #ef4444; }
.lead-chart-legend .series-young::before { background: #8b5cf6; }
.lead-chart-legend .series-bachelor::before { background: #0f9f8f; }
.profit-drivers { margin-top: 18px; padding: 16px; border: 1px solid #dbe7f5; border-radius: 11px; background: #fff; }
.profit-drivers-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.profit-drivers-heading h3 { margin: 0 0 4px; font-size: 15px; }
.profit-drivers-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.profit-drivers-heading > strong { white-space: nowrap; font-size: 14px; }
.profit-driver-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 13px; }
.profit-structure-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
.profit-driver-item { padding: 12px; border-radius: 9px; border-left: 3px solid; background: var(--bg); }
.profit-structure-item { padding: 12px; border: 1px solid #dbe7f5; border-radius: 9px; background: #fbfdff; }
.profit-driver-item.positive { border-color: #22c55e; }
.profit-driver-item.negative { border-color: #ef4444; }
.profit-structure-item.positive .profit-driver-title strong { color: var(--green); }
.profit-structure-item.negative .profit-driver-title strong { color: var(--red); }
.profit-driver-title { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.profit-driver-item.positive .profit-driver-title strong { color: var(--green); }
.profit-driver-item.negative .profit-driver-title strong { color: var(--red); }
.profit-driver-detail, .profit-driver-note { margin-top: 7px; color: var(--muted); font-size: 11px; }
.profit-driver-note { margin-top: 3px; }
.profit-driver-summary, .profit-driver-empty { margin-top: 12px; padding: 9px 11px; border-radius: 7px; background: #f5f8fc; color: var(--text); font-size: 12px; }

.rule-note { font-size: 13px; color: var(--muted); line-height: 1.7; background: var(--bg); border-radius: 8px; padding: 12px 16px; margin-bottom: 14px; }

.upload-form { display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.upload-form input[type=file] { padding: 8px; border: 1px dashed var(--border); border-radius: 8px; }
.upload-form input[type=date] { padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; width: fit-content; }
.upload-form textarea {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  resize: vertical;
}
.upload-form button { padding: 10px; border: none; border-radius: 6px; background: var(--accent); color: #fff; font-size: 14px; cursor: pointer; margin-top: 4px; }

.performance-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.performance-hero h1 { margin-bottom: 7px; }
.performance-template-link { flex: 0 0 auto; padding: 9px 14px; border: 1px solid #bfdbfe; border-radius: 8px; background: #eff6ff; color: #1d4ed8; text-decoration: none; font-size: 13px; font-weight: 700; }
.performance-upload-form { display: grid; grid-template-columns: 160px minmax(180px, 1fr) minmax(220px, 1fr) minmax(260px, 1.4fr) auto; align-items: end; gap: 12px; }
.performance-upload-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.performance-upload-form input { box-sizing: border-box; width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); font: inherit; }
.performance-upload-form input[type=file] { padding: 7px; border-style: dashed; }
.performance-upload-form button { min-height: 40px; padding: 9px 16px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; cursor: pointer; font-weight: 700; white-space: nowrap; }
.performance-form-note { margin: 12px 0 0; }
.performance-overview-alert { margin: 14px 0 0; }
.performance-overview-table { margin-top: 16px; }
.performance-crm-reconciliation .performance-result-heading form { flex: 0 0 auto; }
.performance-crm-reconciliation .performance-result-heading button { min-height: 38px; padding: 8px 14px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; cursor: pointer; font-weight: 700; }
.performance-crm-stat-grid { grid-template-columns: repeat(6, minmax(130px, 1fr)); margin-top: 16px; }
.performance-crm-meta { margin: 12px 0; font-size: 12px; }
.performance-crm-empty { margin-top: 16px; padding: 24px; border: 1px dashed var(--border); border-radius: 10px; background: #f8fafc; color: var(--muted); text-align: center; }
.performance-contribution-cell { min-width: 220px; white-space: normal; }
.performance-contribution-cell span { display: inline-block; margin: 2px 8px 2px 0; padding: 3px 7px; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-size: 12px; }
.performance-reconciliation-contributions { display: grid; gap: 8px; margin: 14px 0; }
.performance-reconciliation-contributions > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.performance-reconciliation-contributions strong { min-width: 110px; font-size: 12px; }
.performance-reconciliation-contributions span { padding: 4px 8px; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-size: 12px; }
.performance-products-card .table-wrap { margin-top: 16px; }
.performance-external-confirm { display: grid; grid-template-columns: minmax(230px, .8fr) minmax(300px, 1.4fr) auto; align-items: center; gap: 14px; margin-top: 16px; padding: 16px; border: 1px solid #f1d58a; border-radius: 10px; background: #fffbeb; }
.performance-external-confirm p { margin: 4px 0 0; }
.performance-external-confirm input { min-height: 40px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.performance-external-confirm button { min-height: 40px; padding: 8px 14px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; cursor: pointer; font-weight: 700; white-space: nowrap; }
.performance-product-confirmed { margin-top: 16px; margin-bottom: 0; }
.performance-result-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.performance-result-heading h2 { margin-bottom: 0; border: 0; }
.performance-stat-grid { grid-template-columns: repeat(6, minmax(130px, 1fr)); }
.performance-breakdown-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.performance-breakdown-card { min-width: 0; }
.performance-breakdown-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.performance-breakdown-heading h2 { margin: 0; padding: 0; border: 0; font-size: 24px; }
.performance-formula-list { margin: 14px 0 0; }
.performance-formula-list > div { display: grid; grid-template-columns: 145px 1fr; gap: 16px; padding: 9px 0; border-bottom: 1px solid #edf1f6; }
.performance-formula-list > div:last-child { border-bottom: 0; }
.performance-formula-list dt { color: var(--muted); font-size: 12px; }
.performance-formula-list dd { margin: 0; text-align: right; font-size: 13px; }
.performance-total-line { display: flex; align-items: center; justify-content: center; gap: 26px; padding: 14px 0 5px; }
.performance-total-line > span { min-width: 170px; text-align: center; }
.performance-total-line small, .performance-total-line strong { display: block; }
.performance-total-line small { margin-bottom: 5px; color: var(--muted); }
.performance-total-line strong { font-size: 22px; }
.performance-total-line b { color: var(--muted); font-size: 22px; }
.performance-total-line .discount strong { color: var(--red); }
.performance-total-line .result strong { color: var(--accent); }
.performance-discount-policy-card { border-color: color-mix(in srgb, var(--accent) 28%, var(--border)); }
.performance-policy-form { display: grid; gap: 18px; margin-top: 18px; }
.performance-policy-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.performance-policy-option { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; background: var(--card); }
.performance-policy-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 14%, transparent); }
.performance-policy-option input { margin-top: 3px; accent-color: var(--accent); }
.performance-policy-option span, .performance-policy-option strong, .performance-policy-option small { display: block; }
.performance-policy-option small { margin-top: 5px; color: var(--muted); line-height: 1.5; }
.performance-policy-reason { display: grid; gap: 7px; }
.performance-policy-reason textarea { width: 100%; resize: vertical; }
.performance-policy-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.performance-policy-summary { display: grid; gap: 6px; margin-top: 16px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-subtle); }
.performance-policy-summary span, .performance-policy-summary small { color: var(--muted); }
.performance-reason-cell { min-width: 230px; max-width: 320px; white-space: normal; text-align: left; line-height: 1.45; }
.performance-issues-table th:nth-child(2), .performance-issues-table td:nth-child(2), .performance-issues-table th:nth-child(3), .performance-issues-table td:nth-child(3) { text-align: left; white-space: normal; min-width: 260px; line-height: 1.5; }
@media (max-width: 1180px) { .performance-upload-form { grid-template-columns: 1fr 1fr; } .performance-upload-form button { width: fit-content; } .performance-stat-grid, .performance-crm-stat-grid { grid-template-columns: repeat(3, 1fr); } .performance-breakdown-grid { grid-template-columns: 1fr; } .performance-external-confirm { grid-template-columns: 1fr; } .performance-external-confirm button { width: fit-content; } }
@media (max-width: 680px) { .performance-hero { align-items: flex-start; flex-direction: column; } .performance-upload-form, .performance-stat-grid, .performance-policy-options { grid-template-columns: 1fr; } .performance-total-line { align-items: stretch; flex-direction: column; gap: 10px; } .performance-total-line b { transform: rotate(90deg); } }
.field-label { font-size: 12px; color: var(--muted); font-weight: 600; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; }
.alert.error { background: #fee2e2; color: var(--red); }
.alert.success { background: #dcfce7; color: var(--green); }
.alert.warning { background: #fef3c7; color: var(--amber); margin-bottom: 0; }
.rebate-warning-heading, .rebate-warning-account { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rebate-warning details { margin-top: 10px; }
.rebate-warning summary { cursor: pointer; font-weight: 700; }
.rebate-warning-list { display: grid; gap: 8px; margin-top: 10px; }
.rebate-warning-account { padding: 9px 10px; border: 1px solid #f1d58a; border-radius: 7px; background: rgba(255,255,255,.58); }
.rebate-warning-account span { min-width: 0; }
.rebate-warning-account small { display: block; margin-top: 3px; color: #765d19; overflow-wrap: anywhere; }
.media-fusion-loading { min-height: 240px; display: flex; align-items: center; justify-content: center; gap: 18px; text-align: left; }
.media-fusion-loading h2 { margin: 0 0 8px; }
.media-fusion-loading p { margin: 0 0 8px; color: var(--muted); }
.media-fusion-loading small { color: var(--accent); font-weight: 700; }
.media-fusion-spinner { width: 38px; height: 38px; flex: 0 0 auto; border: 4px solid #dbeafe; border-top-color: var(--accent); border-radius: 50%; animation: media-fusion-spin .8s linear infinite; }
.media-fusion-loading.fusion-failed .media-fusion-spinner { animation: none; border-color: #fecaca; border-top-color: #dc2626; }
@keyframes media-fusion-spin { to { transform: rotate(360deg); } }
@media (max-width: 720px) {
  .rebate-warning-heading, .rebate-warning-account { align-items: flex-start; flex-direction: column; }
  .media-fusion-loading { min-height: 190px; align-items: flex-start; justify-content: flex-start; }
}

.data-status { display: flex; align-items: center; gap: 11px; padding: 13px 15px; margin: 12px 0; border-radius: 10px; border: 1px solid; }
.data-status .status-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.data-status div { display: flex; flex-direction: column; gap: 3px; }
.data-status strong { font-size: 14px; }
.data-status span { font-size: 12px; }
.data-status.live { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.data-status.live .status-dot { background: #10b981; box-shadow: 0 0 0 4px #d1fae5; }
.data-status.history { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.data-status.history .status-dot { background: #3b82f6; }
.data-status.unavailable { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.data-status.unavailable .status-dot { background: #f59e0b; }

.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 12px;
  font-size: 13px;
}
.cta-banner .btn {
  padding: 6px 14px;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.notes-list { font-size: 13px; line-height: 1.8; margin: 0; padding-left: 18px; }
.empty-cell { color: var(--muted); text-align: center; }

.operator-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.operator-tab { color: var(--muted); background: var(--bg); border: 1px solid var(--border); padding: 6px 12px; border-radius: 999px; text-decoration: none; font-size: 13px; }
.operator-tab.active { color: #fff; background: var(--accent); border-color: var(--accent); }

.supply-tile-ok { background: #ecfdf5; border: 1px solid #a7f3d0; }
.supply-tile-ok .value { color: #047857; }
.supply-tile-risk { background: #fff7ed; border: 1px solid #fed7aa; }
.supply-tile-risk .value { color: #c2410c; }
.supply-table .supply-row-2 { background: #fff7f7; }
.supply-table .supply-row-1 { background: #fffbeb; }
.supply-table .supply-row-0 { background: #fff; }
.supply-table .supply-row-2.supply-direction-shortage-critical { background: #faf7ff; }
.supply-table .supply-row-2.supply-direction-excess-critical { background: #fff7f7; }
.supply-table .supply-row-1.supply-direction-shortage { background: #f7faff; }
.supply-table .supply-row-1.supply-direction-excess { background: #fffaf5; }
.supply-badge { display: inline-block; min-width: 48px; padding: 4px 9px; border-radius: 6px; text-align: center; font-size: 12px; font-weight: 750; }
.supply-badge.risk-2, .supply-badge.status-danger { color: #b91c1c; background: #fee2e2; }
.supply-badge.risk-1, .supply-badge.status-warning { color: #b45309; background: #fef3c7; }
.supply-badge.risk-0, .supply-badge.status-ok { color: #15803d; background: #dcfce7; }
.supply-badge.status-pending { color: #475569; background: #e2e8f0; }
.supply-badge.risk-2.risk-direction-shortage-critical { color: #6d28d9; background: #ede9fe; }
.supply-badge.risk-2.risk-direction-excess-critical { color: #b91c1c; background: #fee2e2; }
.supply-badge.risk-1.risk-direction-shortage { color: #1d4ed8; background: #dbeafe; }
.supply-badge.risk-1.risk-direction-excess { color: #c2410c; background: #ffedd5; }
.supply-badge.status-shortage-critical { color: #6d28d9; background: #ede9fe; border: 1px solid #ddd6fe; }
.supply-badge.status-excess-critical { color: #b91c1c; background: #fee2e2; border: 1px solid #fecaca; }
.supply-badge.status-shortage { color: #1d4ed8; background: #dbeafe; }
.supply-badge.status-excess { color: #c2410c; background: #ffedd5; }
.supply-rate { margin-left: 4px; color: var(--muted); font-size: 11px; }
.supply-action { display: inline-block; padding: 4px 9px; border-radius: 6px; font-size: 12px; white-space: nowrap; }
.action-shortage-critical { color: #6d28d9; background: #ede9fe; }
.action-excess-critical { color: #b91c1c; background: #fee2e2; }
.action-shortage { color: #1d4ed8; background: #dbeafe; }
.action-excess { color: #c2410c; background: #ffedd5; }
.action-ok { color: #15803d; background: #dcfce7; }
.supply-filter-form { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin: 18px 0 14px; padding: 14px; border: 1px solid var(--border); border-radius: 9px; background: #f8fafc; }
.multi-filter { position: relative; min-width: 190px; }
.multi-filter summary { padding: 8px 11px; border: 1px solid #d5dbe4; border-radius: 7px; background: #fff; color: var(--text); font-size: 12px; cursor: pointer; list-style-position: inside; }
.multi-filter > div { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; min-width: 100%; padding: 8px; border: 1px solid #d5dbe4; border-radius: 8px; background: #fff; box-shadow: 0 8px 24px #33415526; }
.multi-filter label { display: flex; align-items: center; gap: 7px; padding: 7px 8px; border-radius: 5px; color: var(--text); font-size: 12px; cursor: pointer; }
.multi-filter label:hover { background: #eff6ff; }
.multi-filter .select-all-option { margin-bottom: 4px; border-bottom: 1px solid var(--border); border-radius: 0; color: var(--accent); font-weight: 750; }
.multi-filter input { margin: 0; }
.multi-filter-search { box-sizing: border-box; width: 100%; margin-bottom: 6px !important; padding: 7px 8px; border: 1px solid #d5dbe4; border-radius: 6px; font: inherit; }
.plan-account-filter > div { width: 280px; max-height: 360px; overflow-y: auto; }
.plan-account-filter label span { min-width: 0; }
.plan-account-filter label strong, .plan-account-filter label small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-account-filter label small { margin-top: 2px; color: var(--muted); font-weight: 400; }
.multi-filter-empty { padding: 12px 8px; color: var(--muted); text-align: center; font-size: 12px; }
.metric-basis-filter { display: flex; align-items: center; gap: 10px; min-height: 34px; margin: 0; padding: 0 10px; border: 1px solid #d5dbe4; border-radius: 7px; }
.metric-basis-filter legend { padding: 0 4px; color: var(--muted); font-size: 11px; }
.metric-basis-filter label { display: flex; align-items: center; gap: 4px; margin: 0; }
.metric-basis-filter input { margin: 0; }
.plan-filter-panel { margin: 14px 0 18px; padding: 16px; border: 1px solid #dbe5f1; border-radius: 12px; background: linear-gradient(135deg, #f8fbff 0%, #fff 70%); }
.plan-filter-fields { display: grid; grid-template-columns: minmax(190px, .8fr) minmax(240px, 1.15fr) minmax(220px, .8fr); gap: 14px; align-items: end; }
.plan-filter-field { min-width: 0; }
.plan-filter-label { display: flex; align-items: center; gap: 6px; min-height: 20px; margin: 0 0 6px 2px; color: #334155; font-size: 12px; font-weight: 750; }
.plan-filter-label small { padding: 2px 6px; border-radius: 10px; background: #e8f1ff; color: var(--accent); font-size: 10px; font-weight: 650; }
.plan-filter-panel .multi-filter { width: 100%; min-width: 0; }
.plan-filter-panel .multi-filter summary { display: flex; align-items: center; justify-content: space-between; min-height: 40px; box-sizing: border-box; padding: 10px 12px; border-color: #cbd8e8; font-size: 13px; }
.plan-filter-panel .multi-filter[open] summary { border-color: #8bb4ea; box-shadow: 0 0 0 3px #dbeafe; }
.plan-filter-panel .multi-filter summary b { color: #64748b; font-size: 15px; transition: transform .15s ease; }
.plan-filter-panel .multi-filter[open] summary b { transform: rotate(180deg); }
.plan-filter-panel .multi-filter-menu { box-sizing: border-box; width: 100%; min-width: 260px; max-height: 360px; padding: 10px; overflow-y: auto; }
.plan-filter-panel .channel-menu { min-width: 220px; }
.plan-filter-panel .multi-filter-options { display: grid; gap: 2px; }
.plan-filter-panel .multi-filter label { padding: 8px; }
.plan-filter-panel .multi-filter label:has(input:checked) { background: #eff6ff; color: #1d4ed8; }
.plan-filter-panel .metric-basis-filter { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; min-height: 40px; box-sizing: border-box; padding: 4px; background: #eef3f8; }
.plan-filter-panel .metric-basis-filter label { justify-content: center; min-height: 30px; padding: 0 10px; border-radius: 6px; cursor: pointer; }
.plan-filter-panel .metric-basis-filter label:has(input:checked) { background: #fff; color: var(--accent); box-shadow: 0 1px 5px #3341551f; font-weight: 750; }
.plan-filter-panel .metric-basis-filter input { position: absolute; opacity: 0; pointer-events: none; }
.plan-filter-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.plan-filter-actions button { padding: 9px 20px; border: 0; border-radius: 7px; background: var(--accent); color: #fff; cursor: pointer; font-weight: 750; }
.plan-filter-actions a { color: var(--muted); font-size: 12px; text-decoration: none; }
.lazy-module-placeholder { margin-top: 12px; padding: 18px; border: 1px dashed #cbd5e1; border-radius: 9px; background: #f8fafc; color: var(--muted); text-align: center; font-size: 12px; }
.lazy-load-form { margin-top: 10px; }
@media (max-width: 900px) { .plan-filter-fields { grid-template-columns: 1fr; } }
.supply-filter-form button { padding: 8px 16px; border: 0; border-radius: 7px; background: var(--accent); color: #fff; cursor: pointer; font-weight: 700; }
.supply-filter-form a { padding: 8px 4px; color: var(--muted); text-decoration: none; font-size: 12px; }
.supply-analysis-link { display: inline-block; min-width: 62px; padding: 5px 8px; border: 1px solid #b9d2f3; border-radius: 6px; background: #f6faff; color: var(--accent); text-align: center; text-decoration: none; font-size: 11px; font-weight: 750; white-space: nowrap; }
.period-picker { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 16px; }
.period-picker > a { padding: 7px 12px; border: 1px solid var(--border); border-radius: 7px; color: var(--muted); text-decoration: none; font-size: 12px; }
.period-picker > a.active { border-color: var(--accent); background: #e8f1ff; color: var(--accent); font-weight: 750; }
.period-picker form { display: flex; align-items: center; gap: 6px; margin-left: 5px; }
.period-picker input { padding: 7px 8px; border: 1px solid var(--border); border-radius: 7px; color: var(--text); font: inherit; }
.period-picker button { padding: 8px 12px; border: 0; border-radius: 7px; background: var(--accent); color: #fff; cursor: pointer; font-weight: 700; }
.attribution-summary .analysis-kpis { margin-bottom: 14px; }
.attribution-guidance { display: flex; gap: 10px; padding: 12px 14px; border-radius: 8px; font-size: 12px; }
.attribution-guidance strong { white-space: nowrap; }
.attribution-guidance.excess { background: #fff1f2; color: #9f1239; }
.attribution-guidance.shortage { background: #eff6ff; color: #1d4ed8; }
.attribution-guidance.normal { background: #ecfdf5; color: #047857; }
.attribution-table small { color: var(--muted); font-size: 10px; }
.attribution-id { display: block; max-width: 12em; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attribution-action { display: inline-block; min-width: 68px; padding: 4px 7px; border-radius: 6px; text-align: center; font-size: 11px; font-weight: 750; white-space: nowrap; }
.attribution-action.action-level-0 { background: #fee2e2; color: #b91c1c; }
.attribution-action.action-level-1 { background: #fef3c7; color: #b45309; }
.attribution-action.action-level-2 { background: #fff7ed; color: #c2410c; }
.attribution-action.action-level-3 { background: #dcfce7; color: #15803d; }
.attribution-action.action-level-4 { background: #e2e8f0; color: #475569; }
.sortable-header { position: relative; padding-right: 22px; cursor: pointer; user-select: none; }
.sortable-header::after { position: absolute; right: 7px; color: #94a3b8; content: "↕"; font-size: 11px; font-weight: 500; }
.sortable-header[aria-sort="descending"]::after { color: var(--accent); content: "↓"; font-weight: 800; }
.sortable-header[aria-sort="ascending"]::after { color: var(--accent); content: "↑"; font-weight: 800; }
.sortable-header:hover { background: #f1f5f9; }
.sortable-header:focus-visible { outline: 2px solid #93c5fd; outline-offset: -2px; }
.server-sort-header a { display: block; color: inherit; text-decoration: none; }
.source-badge { display: inline-flex; white-space: nowrap; padding: 3px 8px; border-radius: 999px; background: #eff6ff; color: #175cd3; font-size: 11px; font-weight: 700; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(145deg, #edf4fc, #f7f9fc 58%, #e8f2ff); }
.login-card { width: min(410px, 100%); padding: 34px 36px 38px; border: 1px solid #dbe6f2; border-radius: 16px; background: #fff; box-shadow: 0 18px 55px #2d5f9630; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; color: #146ee8; }
.login-brand > div { display: flex; flex-direction: column; }
.login-brand strong { font-size: 18px; }
.login-brand div span { margin-top: 3px; color: #6f8cab; font-size: 12px; letter-spacing: .1em; }
.login-card h1 { margin-bottom: 8px; font-size: 22px; }
.login-card > p { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.login-form { display: flex; flex-direction: column; gap: 8px; }
.login-form label { margin-top: 5px; color: #516174; font-size: 13px; font-weight: 650; }
.login-form input { width: 100%; padding: 11px 12px; border: 1px solid #d6dde6; border-radius: 8px; font: inherit; outline: none; }
.login-form input:focus { border-color: #6da7ef; box-shadow: 0 0 0 3px #dcecff; }
.login-form button { margin-top: 10px; padding: 11px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
.access-denied { max-width: 560px; margin: 80px auto; text-align: center; padding: 48px 32px; }
.access-icon { display: grid; place-items: center; width: 50px; height: 50px; margin: 0 auto 18px; border-radius: 50%; background: #fef3c7; color: var(--amber); font-size: 25px; font-weight: 800; }
.access-link { display: inline-block; margin-top: 14px; padding: 9px 16px; border-radius: 7px; background: var(--accent); color: #fff; text-decoration: none; font-size: 14px; font-weight: 600; }
.section-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.section-toolbar h2 { margin: 0; padding: 0; border: 0; }
.add-user-trigger { padding: 8px 14px; border: none; border-radius: 7px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }
.user-dialog { width: min(430px, calc(100vw - 32px)); padding: 22px 24px 24px; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 20px 60px #1f293733; color: var(--text); }
.user-dialog::backdrop { background: #17203373; backdrop-filter: blur(2px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dialog-heading h2 { margin: 0; padding: 0; border: 0; font-size: 17px; }
.dialog-close { width: 30px; height: 30px; padding: 0; border: none; border-radius: 50%; background: var(--bg); color: var(--muted); font-size: 22px; cursor: pointer; }
.settings-form { display: flex; flex-direction: column; gap: 8px; }
.settings-form label { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.settings-form input, .settings-form select { width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--text); font: inherit; }
.settings-form button { padding: 10px 14px; border: none; border-radius: 7px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.settings-form .secondary-button { background: #eef1f5; color: var(--text); }
.badge.role-admin { background: #dbeafe; color: #1d4ed8; }
.badge.role-operator { background: #e5e7eb; color: #4b5563; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--green); }
.status-dot.inactive { background: #94a3b8; }
.user-actions { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.user-actions form { margin: 0; }
.user-actions button { padding: 0; border: 0; background: transparent; color: var(--accent); cursor: pointer; font: inherit; font-weight: 600; }
.user-actions button.danger-link { color: #b42318; }
.password-card { max-width: 520px; }
.account-panel .account-action { display: inline-block; margin-top: 8px; color: #52677f; font-size: 12px; text-decoration: none; }
.account-panel .account-action:hover { color: var(--accent); }
.city-metrics { margin-bottom: 20px; }
.city-metrics .stat-tile { background: var(--card); border: 1px solid var(--border); }
.city-toolbar-title { margin-bottom: 12px; }
.city-filter-form, .bulk-city-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.city-filter-form { margin-bottom: 12px; }
.city-filter-form input, .city-filter-form select, .bulk-city-actions select, .inline-city-form select { padding: 7px 9px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--text); }
.city-filter-form button, .bulk-city-actions button { padding: 7px 12px; border: none; border-radius: 7px; background: var(--accent); color: #fff; cursor: pointer; font-weight: 600; }
.city-filter-form a { color: var(--muted); text-decoration: none; font-size: 13px; }
.bulk-city-actions { margin-bottom: 12px; padding: 10px 12px; border-radius: 8px; background: var(--bg); font-size: 13px; }
.bulk-city-actions .warning-button { background: #d97706; }
.bulk-city-actions .secondary-button { background: #64748b; }
.city-table th:first-child, .city-table td:first-child { width: 34px; text-align: center; }
.city-status { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.city-status.effective { background: #dcfce7; color: #15803d; }
.city-status.paused { background: #fee2e2; color: #b91c1c; }
.city-status.inactive { background: #e5e7eb; color: #64748b; }
.inline-city-form { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.inline-city-form button { padding: 6px 8px; border: none; border-radius: 6px; background: #e8f1ff; color: var(--accent); cursor: pointer; font-weight: 600; }
.link-button { border: none; background: transparent; cursor: pointer; font-weight: 600; }
.link-button.pause { color: #b45309; }
.link-button.resume { color: var(--green); }

@media (max-width: 760px) {
  body { overflow: auto; }
  .app-shell { display: block; height: auto; min-height: 100vh; overflow: visible; }
  .sidebar { width: 100%; height: auto; min-height: auto; overflow: visible; padding: 14px 16px; border-right: none; border-bottom: 1px solid var(--border); }
  .brand { padding: 0 0 14px; }
  .sidebar-primary, .nav-label { display: none; }
  .sidebar nav { flex-direction: row; gap: 8px; overflow-x: auto; }
  .sidebar nav .nav-item { white-space: nowrap; padding: 7px 10px; font-size: 13px; }
  .nav-item svg { width: 18px; height: 18px; flex-basis: 18px; }
  .container { width: 100%; height: auto; margin: 0; padding: 16px; overflow: visible; }
  .city-filter-form, .bulk-city-actions { align-items: stretch; }
  .profit-hero-main { grid-template-columns: 1fr; gap: 20px; padding: 20px 0; }
  .profit-support-grid { grid-template-columns: repeat(2, 1fr); }
  .profit-driver-grid { grid-template-columns: 1fr; }
  .profit-structure-grid { grid-template-columns: 1fr; }
  .profit-drivers-heading { flex-direction: column; }
  .feedback-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .feedback-aggregate-grid { grid-template-columns: 1fr; }
  .lead-trend-grid { grid-template-columns: 1fr; }
  .kol-stat-grid, .kol-trend-grid { grid-template-columns: 1fr; }
  .lead-quality-chart-card { grid-column: auto; }
  .profit-support-grid > div { border-bottom: 1px solid #dbe7f5; }
  .profit-support-grid > div:first-child { padding-left: 14px; }
  .profit-progress-meta, .profit-pace { align-items: flex-start; flex-direction: column; gap: 5px; }
}
.validation-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.validation-summary > div {
  background: #f7f8fa;
  border-radius: 8px;
  padding: 12px;
}
.validation-summary span, .validation-summary strong { display: block; }
.validation-summary span { color: #6b7280; font-size: 13px; margin-bottom: 5px; }
.validation-high { background: #fff1f2; }
.validation-warning { background: #fff8e6; }
.validation-info { background: #f0f7ff; }
.validation-pending { background: #f3f4f6; }
.confirm-check { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.confirm-check input { width: auto; }
.danger-button { background: #b42318; }

.analysis-filter { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.analysis-filter label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 650; }
.analysis-filter input, .analysis-filter select { min-width: 132px; padding: 8px 9px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--text); font: inherit; }
.analysis-filter button { padding: 9px 16px; border: 0; border-radius: 7px; background: var(--accent); color: #fff; cursor: pointer; font-weight: 700; }

.bilibili-query-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr) 112px;
  gap: 12px;
  align-items: stretch;
  margin: 18px 0 14px;
}
.bilibili-query-field {
  min-width: 0;
  min-height: 50px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #d8dbe2;
  border-radius: 7px;
  background: #fff;
  color: #18213d;
  box-shadow: 0 1px 2px rgba(18, 29, 61, .03);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.bilibili-query-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(66, 91, 255, .10);
}
.bilibili-query-label {
  flex: 0 0 auto;
  color: #18213d;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}
.bilibili-query-field input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #18213d;
  font: inherit;
  font-size: 14px;
}
.bilibili-query-field input::placeholder { color: #c3c7d2; }
.bilibili-date-range input[type="date"] { flex: 1 1 104px; width: 104px; padding: 0; }
.bilibili-date-range input[type="date"]::-webkit-calendar-picker-indicator { display: none; }
.bilibili-date-separator { margin: 0 5px; color: #18213d; }
.bilibili-field-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-left: auto;
  fill: none;
  stroke: #7e879b;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bilibili-account-search input { flex: 1; padding: 0; }
.bilibili-query-button {
  width: 112px;
  min-height: 50px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
  font-size: 13px;
}
.bilibili-query-button:hover { filter: brightness(.96); }
.fusion-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 12px 0; }
.fusion-filter-group { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.fusion-toolbar label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 650; }
.fusion-toolbar input { min-width: 260px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; font: inherit; }
.fusion-application-select { min-width: 220px; }
.fusion-application-select summary { display: flex; align-items: center; justify-content: space-between; min-height: 35px; box-sizing: border-box; }
.fusion-application-select .multi-filter-menu { width: 240px; box-sizing: border-box; }
.fusion-application-select input[type="checkbox"] { min-width: 0; }
.fusion-toolbar > span { color: var(--muted); font-size: 12px; }
.fusion-pagination { justify-content: center; align-items: center; margin-top: 16px; }
.store-page-controls { flex-wrap: wrap; gap: 8px; }
.page-numbers, [data-pages], [data-pagination-pages] { display: inline-flex; gap: 5px; }
.page-number, .fusion-pagination .page-number { min-width: 34px; height: 34px; padding: 0 9px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #334155; box-shadow: none; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; }
.page-number.active, .fusion-pagination .page-number.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.page-jump { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.page-jump input[type="number"] { width: 68px; min-width: 68px; padding: 7px 8px; }
.server-sort-header a { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: inherit; text-decoration: none; }
.server-sort-header a span { color: #64748b; font-size: 12px; }
.channel-picker { position: relative; min-width: 220px; }
.channel-picker > summary { padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--text); font-size: 12px; cursor: pointer; list-style-position: inside; }
.channel-picker > div { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 6px 12px; width: 370px; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: #fff; box-shadow: 0 12px 30px #1f29371f; }
.channel-picker label { flex-direction: row; align-items: center; gap: 6px; color: var(--text); font-size: 12px; font-weight: 500; }
.channel-picker input { min-width: auto; width: auto; }
.channel-picker p { grid-column: 1 / -1; margin: 4px -12px -12px; padding: 8px 12px; border-top: 1px solid var(--border); border-radius: 0 0 9px 9px; background: #f8fafc; color: var(--muted); font-size: 10px; }
.channel-picker:not([open]) > div { display: none; }
.analysis-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 20px; }
.analysis-kpis > div { padding: 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); }
.analysis-kpis span, .analysis-kpis strong { display: block; }
.analysis-kpis span { margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.analysis-kpis strong { font-size: 18px; }
.query-result-card { border-color: #cfdced; }
.period-result-table tbody tr:nth-child(even) { background: #fafbfd; }
.emphasis-total th, .period-result-table tfoot th { font-weight: 800; }
.full-result-detail { margin-top: 12px; }
.full-result-detail > summary { width: fit-content; color: var(--accent); cursor: pointer; font-size: 12px; font-weight: 700; }
.fixed-table-scroll { max-height: 360px; margin-top: 10px; overflow: auto; border: 1px solid var(--border); border-radius: 7px; }
.fixed-table-scroll table { margin: 0; }
.fixed-table-scroll thead { position: sticky; z-index: 2; top: 0; background: #fff; }
.fixed-table-scroll tfoot { position: sticky; z-index: 2; bottom: 0; }
.comparison-filter { align-items: flex-end; padding: 2px 0 16px; }
.comparison-filter fieldset { display: flex; gap: 8px; margin: 0; padding: 7px 10px 10px; border: 1px solid var(--border); border-radius: 8px; }
.comparison-filter legend { padding: 0 4px; color: var(--muted); font-size: 11px; font-weight: 700; }
.comparison-filter fieldset input { min-width: 126px; }
.comparison-table tbody th { text-align: left; font-weight: 750; }
.analysis-table-spaced { margin-top: 14px; }
.secondary-link { padding: 7px 11px; border: 1px solid #b9d2f3; border-radius: 7px; color: var(--accent); background: #f6faff; text-decoration: none; font-size: 12px; font-weight: 700; white-space: nowrap; }
.share-cell { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.share-cell i { display: block; width: 56px; height: 5px; overflow: hidden; border-radius: 99px; background: #e5eaf0; }
.share-cell b { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.fixed-comparison-scroll { max-height: 430px; overflow-y: auto; }
.change-status { display: inline-block; padding: 2px 6px; border-radius: 999px; background: #eef2f7; color: #526071; font-size: 10px; }
.status-新增, .status-排名上升 { background: #e8f7ee; color: #147a3d; }
.status-消失, .status-排名下降 { background: #fff0f0; color: #b42318; }
.full-page-table { max-height: calc(100vh - 190px); }
.account-name { display: inline-block; max-width: 9em; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; white-space: nowrap; cursor: help; }
.account-id { display: inline-block; max-width: 8em; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; white-space: nowrap; cursor: help; }
.plan-id { display: inline-block; max-width: 12em; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; white-space: nowrap; cursor: help; }
.heading-with-help { display: flex; align-items: center; gap: 6px; }
.help-tooltip { position: relative; display: inline-grid; place-items: center; width: 17px; height: 17px; border: 1px solid #9eb3ca; border-radius: 50%; color: #627992; background: #f7faff; font-size: 11px; font-weight: 800; cursor: help; outline: none; }
.help-tooltip::after { position: absolute; z-index: 20; left: 24px; top: 50%; width: 340px; padding: 9px 11px; border-radius: 7px; background: #263445; color: #fff; box-shadow: 0 8px 24px #11182733; content: attr(data-tooltip); font-size: 11px; font-weight: 500; line-height: 1.6; opacity: 0; pointer-events: none; transform: translateY(-50%); transition: opacity .15s; }
.help-tooltip:hover::after, .help-tooltip:focus::after { opacity: 1; }
.audience-overview-table th, .audience-overview-table td { padding-left: 8px; padding-right: 8px; }
.permission-table td:first-child { color: var(--muted); font-size: 12px; }
.permission-state { font-size: 12px; font-weight: 700; }
.permission-state.allowed { color: var(--green); }
.permission-state.denied { color: var(--muted); }
.permission-toggle { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-size: 12px; cursor: pointer; }
.permission-toggle input { width: 16px; height: 16px; accent-color: var(--accent); }
.locked-note { padding: 3px 7px; border-radius: 999px; background: #fff3e8; color: #9a5a18; font-size: 10px; font-weight: 700; }
.permission-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.permission-actions button { padding: 9px 16px; border: 0; border-radius: 7px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }
.comparison-group-title { display: flex; align-items: center; gap: 7px; margin: 16px 0 7px; color: var(--text); font-size: 13px; }
.comparison-group-title span { padding: 2px 6px; border-radius: 999px; background: #eef2f7; color: var(--muted); font-size: 10px; }
.plan-change-table { max-height: 280px; overflow-y: auto; }
.metric-tabs { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.metric-tabs a { padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 12px; text-decoration: none; }
.metric-tabs a.active { border-color: var(--accent); background: #e8f1ff; color: var(--accent); font-weight: 700; }
.analysis-chart-wrap { width: 100%; overflow-x: auto; }
.analysis-chart { width: 100%; min-width: 720px; height: auto; }
.analysis-chart text { fill: var(--muted); font-size: 10px; }
.chart-axis { stroke: #cbd5e1; stroke-width: 1; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; color: var(--muted); font-size: 12px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 9px; height: 9px; border-radius: 50%; }
.trend-detail { margin-top: 14px; }
.trend-detail summary { width: fit-content; color: var(--accent); cursor: pointer; font-size: 12px; font-weight: 650; }
.trend-detail .table-wrap { margin-top: 10px; }
.analysis-breadcrumb { display: flex; align-items: center; gap: 7px; margin-bottom: 14px; color: var(--muted); font-size: 12px; }
.analysis-breadcrumb a { color: var(--accent); text-decoration: none; }
.selected-row { background: #eff6ff; }
.table-wrap a { color: var(--accent); text-decoration: none; font-weight: 650; }
.nav-item.nav-disabled { cursor: not-allowed; opacity: .52; }
.nav-item.nav-disabled:hover { background: transparent; color: inherit; }
.nav-item.nav-disabled em { margin-left: auto; padding: 2px 6px; border-radius: 999px; background: #e5e7eb; color: #6b7280; font-size: 9px; font-style: normal; font-weight: 700; white-space: nowrap; }
.management-editor { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.management-editor > summary { width: fit-content; color: var(--accent); cursor: pointer; font-size: 13px; font-weight: 700; }
.agency-form-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.agency-form-grid label, .agency-account-toolbar label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 650; }
.agency-form-grid input, .agency-form-grid select, .agency-account-toolbar input, .agency-account-toolbar select { box-sizing: border-box; width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--text); font: inherit; }
.agency-form-wide { grid-column: span 2; }
.agency-form-actions { display: flex; align-items: flex-end; gap: 10px; }
.agency-form-actions button, .agency-account-toolbar button { min-height: 38px; padding: 8px 15px; border: 0; border-radius: 7px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }
.secondary-link { align-self: center; }
.agency-account-toolbar { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto; gap: 12px; align-items: end; margin: 12px 0 16px; }
.agency-account-toolbar .inline-checkbox { flex-direction: row; align-items: center; min-height: 38px; white-space: nowrap; }
.agency-account-toolbar .inline-checkbox input { width: auto; min-height: 0; }
.status-pill { display: inline-flex; align-items: center; width: fit-content; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.success-pill { background: #e8f7ef; color: #16794a; }
.muted-pill { background: #eef2f7; color: var(--muted); }
.warning-pill { background: #fff4dd; color: #946200; }
.compact-button, .table-action { border: 0; border-radius: 7px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }
.compact-button { display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; text-decoration: none; }
.table-action { display: inline-flex; align-items: center; padding: 5px 10px; font-size: 11px; text-decoration: none; }
.table-wrap a.table-action, .table-actions a.table-action { color: #fff; }
.feedback-plan-detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 96px;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  background: #eff6ff;
  color: #1d4ed8 !important;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
}
.feedback-plan-detail-link:hover { border-color: #93c5fd; background: #dbeafe; }
#feedback-account-table th:last-child,
#feedback-account-table td:last-child { min-width: 116px; text-align: center; white-space: nowrap; }
.management-modal { width: min(560px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 12px; box-shadow: 0 20px 60px rgba(15, 23, 42, .22); }
.management-modal-wide { width: min(820px, calc(100vw - 32px)); }
.management-modal-batch { width: min(980px, calc(100vw - 32px)); }
.management-modal::backdrop { background: rgba(15, 23, 42, .42); backdrop-filter: blur(2px); }
.management-modal form { padding: 22px; }
.management-modal-content { padding: 22px; }
.media-center-heading { background:linear-gradient(135deg,#fff 0%,#f7faff 100%); }
.media-center-heading h1 { margin-bottom:8px; }
.media-channel-list { display:flex; flex-direction:column; gap:14px; }
.media-channel-row { display:grid; grid-template-columns:minmax(210px,240px) minmax(0,1fr) minmax(220px,260px); grid-template-areas:"identity status entry" "kpis kpis times"; gap:18px 24px; align-items:center; min-width:0; padding:22px 24px; border:1px solid var(--line); border-radius:14px; background:#fff; box-shadow:0 4px 18px rgba(15,23,42,.04); }
.media-channel-row.has-alert { border-color:#f3c8c8; box-shadow:inset 3px 0 #d9534f,0 4px 18px rgba(15,23,42,.04); }
.media-channel-identity { grid-area:identity; display:flex; align-items:center; gap:14px; min-width:0; }
.media-channel-identity h1,.media-channel-identity h2,.media-channel-identity p { margin:0; }
.media-channel-identity h1 { font-size:26px; }
.media-channel-identity h2 { font-size:18px; }
.media-channel-identity p { margin-top:4px; color:var(--muted); font-size:12px; }
.media-channel-logo { display:grid; place-items:center; flex:0 0 auto; width:48px; height:48px; border-radius:14px; background:#eef2ff; color:#3f51b5; font-size:18px; font-weight:850; box-shadow:inset 0 0 0 1px rgba(63,81,181,.08); }
.media-channel-logo.bilibili-logo { background:linear-gradient(145deg,#fff0f5,#ffe2ec); color:#ec6b93; }
.media-channel-logo.tencent-logo { background:linear-gradient(145deg,#eef8ff,#dcefff); color:#1474ed; }
.media-channel-logo.oceanengine-logo { background:linear-gradient(145deg,#eaf8ff,#ffeaf2); color:#161823; border-color:#cfe8f3; }
.media-channel-logo.xiaohongshu-logo { background:linear-gradient(145deg,#fff1f1,#ffe5e5); color:#ff2442; border-color:#ffc8d0; }
.media-channel-logo.zhihu-logo { background:linear-gradient(145deg,#f0f6ff,#e2edff); color:#056de8; border-color:#c6dcff; }
.media-channel-status { grid-area:status; display:flex; flex-direction:row; align-items:center; gap:10px; min-width:0; }
.media-channel-status small { color:var(--muted); font-size:11px; }
.media-channel-kpis { grid-area:kpis; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); min-width:0; overflow:hidden; border:1px solid #edf0f4; border-radius:11px; background:#f8fafc; }
.media-channel-kpis>div { padding:12px 16px; border-right:1px solid #e7ebf0; }
.media-channel-kpis>div:last-child { border-right:0; }
.media-channel-kpis span,.media-channel-kpis strong { display:block; }
.media-channel-kpis span { color:var(--muted); font-size:11px; word-break:keep-all; }
.media-channel-kpis strong { margin-top:5px; font-size:18px; white-space:nowrap; }
.media-channel-times { grid-area:times; display:flex; flex-direction:column; gap:9px; min-width:0; padding:4px 0 4px 20px; border-left:1px solid #e7ebf0; }
.media-channel-times div { display:flex; justify-content:space-between; gap:18px; font-size:12px; }
.media-channel-times span { color:var(--muted); }
.media-channel-entry { grid-area:entry; justify-self:end; display:inline-flex; align-items:center; justify-content:center; min-width:102px; padding:10px 16px; border:1px solid #1d4ed8; border-radius:9px; background:linear-gradient(135deg,#3b82f6,#2563eb); box-shadow:0 4px 10px rgba(37,99,235,.22); color:#fff; text-decoration:none; font-weight:700; white-space:nowrap; }
.media-channel-entry:hover { background:linear-gradient(135deg,#2563eb,#1d4ed8); }
.media-channel-entry.disabled { background:#edf0f4; color:#9aa3af; }
.media-channel-disabled { grid-template-areas:"identity status entry" "copy copy copy"; padding-top:17px; padding-bottom:17px; background:#fafbfc; box-shadow:none; opacity:.72; }
.media-channel-disabled-copy { grid-area:copy; min-width:0; color:var(--muted); font-size:13px; overflow-wrap:anywhere; }
.media-back-link { display:inline-flex; margin:2px 0 12px; color:var(--accent); font-size:13px; font-weight:700; text-decoration:none; }
.media-detail-hero { display:flex; justify-content:space-between; align-items:center; gap:24px; padding:24px 28px; background:linear-gradient(135deg,#fff 0%,#fff6f9 100%); }
.media-detail-state { display:flex; flex-direction:column; align-items:flex-end; gap:7px; min-width:0; color:var(--muted); text-align:right; }
.media-detail-kpis { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:1px; margin:0 0 16px; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:var(--line); }
.media-detail-kpis>div { padding:16px 18px; background:#fff; }
.media-detail-kpis span,.media-detail-kpis strong { display:block; }
.media-detail-kpis span { color:var(--muted); font-size:11px; }
.media-detail-kpis strong { margin-top:6px; font-size:20px; }
.media-auth-card { border-left:3px solid #ec6b93; }
.media-auth-details { display:grid; grid-template-columns:.7fr .7fr .9fr 2fr; gap:12px; min-width:0; margin-top:16px; padding:14px 16px; border-radius:10px; background:#f8fafc; }
.media-auth-details>div { min-width:0; }
.media-auth-details span,.media-auth-details strong,.media-auth-details code { display:block; }
.media-auth-details span { margin-bottom:5px; color:var(--muted); font-size:11px; }
.media-auth-details code { overflow-wrap:anywhere; color:var(--text); font-size:11px; }
.media-refresh-card>div:first-child h2,.media-refresh-card>div:first-child p { margin-bottom:6px; }
.media-refresh-layout { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(280px,1fr); gap:16px 20px; align-items:end; min-width:0; margin-top:18px; padding:18px; border:1px solid #e7ebf0; border-radius:12px; background:#f8fafc; }
.media-refresh-dates>label,.media-refresh-modes>span { display:block; margin-bottom:9px; color:var(--muted); font-size:11px; font-weight:700; }
.media-refresh-dates>div { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:8px; }
.media-refresh-dates input,.media-account-filter input { box-sizing:border-box; min-height:40px; padding:8px 10px; border:1px solid var(--border); border-radius:8px; background:#fff; color:var(--text); font:inherit; }
.media-refresh-dates input { width:100%; min-width:0; }
.media-refresh-modes { display:flex; flex-wrap:wrap; align-items:center; gap:7px; }
.media-refresh-modes>span { width:100%; }
.media-refresh-controls { display:flex; align-items:flex-end; justify-content:flex-end; gap:10px; min-width:0; }
.media-refresh-controls .media-refresh-modes { flex:1 1 auto; min-width:0; }
.media-refresh-modes label { display:flex; align-items:flex-start; gap:7px; flex:1 1 125px; min-width:0; padding:7px 9px; border:1px solid #dfe5eb; border-radius:8px; background:#fff; cursor:pointer; }
.media-refresh-modes label:has(input:checked) { border-color:#93b4f8; background:#eef5ff; box-shadow:inset 0 0 0 1px #c7d8fb; }
.media-refresh-modes input { margin:2px 0 0; accent-color:var(--accent); }
.media-refresh-modes label span,.media-refresh-modes label small { display:block; }
.media-refresh-modes label strong { font-size:12px; }
.media-refresh-modes label small { margin-top:2px; color:var(--muted); font-size:9px; white-space:nowrap; }
.media-refresh-controls>button { flex:0 0 auto; min-width:108px; min-height:42px; padding:9px 16px; border:1px solid #1d4ed8; border-radius:9px; background:linear-gradient(135deg,#3b82f6,#2563eb); box-shadow:0 4px 10px rgba(37,99,235,.22); color:#fff; font-weight:700; cursor:pointer; white-space:nowrap; }
.media-refresh-controls>button:hover { background:linear-gradient(135deg,#2563eb,#1d4ed8); }
.media-account-filter { display:flex; align-items:center; gap:9px; }
.media-account-filter label { color:var(--muted); font-size:11px; font-weight:700; white-space:nowrap; }
.media-account-filter input { width:220px; }
.inline-actions { display:flex; align-items:center; gap:12px; }
.media-authorization-table .inline-actions { flex-wrap:nowrap; gap:8px; min-width:250px; }
.media-authorization-table .inline-actions input { box-sizing:border-box; width:170px; min-height:36px; padding:7px 9px; border:1px solid var(--border); border-radius:8px; color:var(--text); font:inherit; }
#sync-account-table form { margin:0; }
#sync-account-table button { min-width:86px; padding:7px 12px; }
#sync-account-status-filter { min-height:40px; padding:8px 30px 8px 10px; border:1px solid var(--border); border-radius:8px; background:#fff; color:var(--text); font:inherit; }
.account-membership-actions { flex-wrap:wrap; margin:14px 0; }
.media-health-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.media-health-grid-wide { grid-template-columns:repeat(5,minmax(0,1fr)); margin-bottom:16px; }
.media-health-grid>div { padding:14px; border:1px solid var(--line); border-radius:10px; background:var(--card); }
.media-health-grid span,.media-health-grid strong { display:block; }
.media-health-grid span { color:var(--muted); font-size:12px; }
.media-health-grid strong { margin-top:6px; font-size:18px; overflow-wrap:anywhere; }
.status-pill { display:inline-flex; padding:4px 9px; border-radius:999px; background:#eef1f5; color:#657080; font-size:12px; white-space:nowrap; }
.status-pill.success { background:#e9f8ef; color:#168447; }
.status-pill.warning { background:#fff4dc; color:#a56700; }
.status-pill.error { background:#ffebeb; color:#b52d2d; }
.primary-button,.secondary-button { display:inline-flex; align-items:center; justify-content:center; width:max-content; padding:9px 14px; border-radius:8px; text-decoration:none; }
.primary-button { background:var(--primary); color:#fff; }
.secondary-button { border:1px solid var(--line); color:var(--text); background:#fff; }
.store-account-picker { display:flex; flex-wrap:wrap; gap:10px 16px; min-width:min(520px,100%); padding:12px 14px; border:1px solid var(--line); border-radius:9px; }
.store-account-picker legend { padding:0 5px; color:var(--muted); font-size:12px; font-weight:700; }
.checkbox-label { display:inline-flex; align-items:center; gap:6px; font-size:13px; }
.checkbox-label input { width:auto; margin:0; }
.store-job-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:16px; }
.store-job-account { margin:0; }
.store-captcha { display:block; width:180px; max-height:72px; object-fit:contain; margin:14px 0; border:1px solid var(--line); border-radius:8px; background:#fff; }
.store-captcha-form { display:flex; align-items:end; gap:10px; margin-bottom:10px; }
.store-captcha-form label { flex:1; }
.store-progress { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:14px 0 0; }
.store-progress div { padding:10px; border-radius:8px; background:var(--soft); }
.store-progress dt { color:var(--muted); font-size:11px; }
.store-progress dd { margin:4px 0 0; font-size:16px; font-weight:800; }
.page-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:14px; }
.page-actions form { margin:0; }
.alert-inline { color:#b91c1c; font-size:11px; }
@media (max-width:700px) { .store-job-grid { grid-template-columns:1fr; } .store-captcha-form { align-items:stretch; flex-direction:column; } }
.sync-mode-option { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
@media (max-width: 1100px) { .media-channel-row { grid-template-columns:minmax(180px,230px) minmax(0,1fr) auto; grid-template-areas:"identity status entry" "kpis kpis kpis"; } .media-channel-times { display:none; } .media-channel-disabled { grid-template-areas:"identity status entry" "copy copy copy"; } .media-refresh-layout { grid-template-columns:1fr; align-items:stretch; } }
@media (max-width: 1000px) { .media-health-grid,.media-health-grid-wide { grid-template-columns:repeat(2,minmax(0,1fr)); } .media-detail-kpis { grid-template-columns:repeat(3,minmax(0,1fr)); } .media-auth-details { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.modal-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal-heading h2 { margin: 0; }
.modal-heading button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: #eef2f7; color: var(--muted); font-size: 22px; cursor: pointer; }
.modal-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal-form-grid label, .management-modal > form > label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 650; }
.modal-form-grid input, .modal-form-grid select, .management-modal > form > label select { box-sizing: border-box; width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--text); font: inherit; }
.modal-form-wide { grid-column: 1 / -1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.modal-actions button { min-width: 88px; min-height: 38px; padding: 8px 14px; border: 0; border-radius: 7px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }
.modal-actions button.secondary { border: 1px solid var(--border); background: #fff; color: var(--text); }
.dual-account-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 14px; align-items: stretch; }
.dual-account-picker section { min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: #f8fafc; }
.dual-picker-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; font-size: 12px; }
.dual-picker-heading span { color: var(--muted); font-size: 11px; }
.dual-account-picker section > input { box-sizing: border-box; width: 100%; min-height: 38px; margin-bottom: 9px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; background: #fff; font: inherit; }
.dual-account-list { height: 300px; overflow-y: auto; border: 1px solid var(--border); border-radius: 7px; background: #fff; }
.dual-account-option { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-bottom: 1px solid #edf1f5; cursor: pointer; }
.dual-account-option:last-child { border-bottom: 0; }
.dual-account-option:hover { background: #f1f6ff; }
.dual-account-option span { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.dual-account-option strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.dual-account-option small { color: var(--muted); font-size: 10px; }
.dual-picker-actions { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 9px; }
.dual-picker-actions button { min-width: 78px; padding: 8px 10px; border: 0; border-radius: 7px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; cursor: pointer; }
.dual-picker-actions button.secondary { border: 1px solid var(--border); background: #fff; color: var(--text); }
.batch-agency-config { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.batch-agency-config label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 650; }
.batch-agency-config select { min-height: 40px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; background: #fff; font: inherit; }

@media (max-width: 900px) {
  .bilibili-query-toolbar { grid-template-columns: 1fr; gap: 10px; }
  .bilibili-query-button { min-height: 48px; }
  .analysis-kpis { grid-template-columns: repeat(3, 1fr); }
  .agency-form-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .agency-account-toolbar { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .media-channel-row { grid-template-columns:minmax(0,1fr); grid-template-areas:"identity" "status" "kpis" "times" "entry"; gap:15px; padding:18px; }
  .media-channel-disabled { grid-template-areas:"identity" "status" "copy" "entry"; }
  .media-channel-status { align-items:flex-start; margin-left:0; }
  .media-channel-kpis { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .media-channel-kpis>div { padding:10px; }
  .media-channel-entry { width:100%; box-sizing:border-box; }
  .media-detail-hero { align-items:flex-start; flex-direction:column; padding:20px; }
  .media-detail-state { align-items:flex-start; }
  .media-detail-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .media-auth-details { grid-template-columns:1fr; }
  .media-refresh-layout { padding:14px; }
  .media-refresh-dates>div { grid-template-columns:1fr; align-items:stretch; }
  .media-refresh-dates>div span { text-align:center; }
  .media-refresh-modes { flex-direction:column; }
  .media-refresh-modes label { min-width:0; }
  .media-refresh-controls { align-items:stretch; flex-direction:column; }
  .media-refresh-controls>button { width:100%; }
  .media-account-filter { width:100%; align-items:stretch; flex-direction:column; }
  .media-account-filter input { width:100%; }
  .analysis-filter { align-items: stretch; }
  .analysis-filter label, .analysis-filter input, .analysis-filter select { width: 100%; }
  .analysis-filter .kol-form-action { width: 100%; align-self: stretch; }
  .channel-picker, .channel-picker > summary { width: 100%; }
  .channel-picker > div { width: 100%; }
  .analysis-kpis { grid-template-columns: repeat(2, 1fr); }
  .section-toolbar { align-items: flex-start; flex-direction: column; }
  .metric-tabs { justify-content: flex-start; }
  .comparison-filter fieldset { width: 100%; flex-direction: column; }
  .agency-form-grid, .agency-account-toolbar { grid-template-columns: 1fr; }
  .agency-form-wide { grid-column: auto; }
  .modal-form-grid { grid-template-columns: 1fr; }
  .modal-form-wide { grid-column: auto; }
  .dual-account-picker { grid-template-columns: 1fr; }
  .dual-picker-actions { flex-direction: row; }
  .dual-account-list { height: 220px; }
}
.store-progress-modal { width:min(760px,calc(100vw - 32px)); max-height:88vh; overflow:hidden; }
.store-progress-shell { padding:28px 30px 24px; }
.store-progress-heading { margin-bottom:14px; }
.store-progress-heading h2 { margin-top:5px; font-size:24px; }
.store-progress-intro { margin:0; padding:13px 16px; border:1px solid #dbeafe; border-radius:10px; background:#f0f7ff; color:#3f526b; font-size:13px; line-height:1.65; }
.store-progress-accounts { display:grid; gap:14px; margin:20px 0; max-height:55vh; overflow:auto; padding-right:4px; }
.store-progress-account { border:1px solid #e2e8f0; border-radius:14px; padding:18px 20px; background:#fff; box-shadow:0 5px 18px rgba(15,23,42,.045); }
.store-progress-account-head { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:16px; }
.store-progress-account-head > div { display:grid; gap:3px; }
.store-progress-account-head strong { font-size:16px; color:var(--text); }
.store-progress-account-head small { color:var(--muted); font-size:11px; }
.store-progress-lines { display:grid; gap:12px; }
.store-progress-metric { display:grid; grid-template-columns:80px minmax(120px,1fr) minmax(145px,auto); align-items:center; gap:14px; }
.store-progress-metric > span,.store-progress-detail > span { color:#64748b; font-size:12px; font-weight:650; }
.store-progress-metric > strong,.store-progress-detail > strong { color:#253858; font-size:12px; text-align:right; }
.store-progress-track { height:8px; overflow:hidden; border-radius:999px; background:#e9eef5; }
.store-progress-track i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#2f6fed,#4d8dff); transition:width .3s ease; }
.store-progress-detail { display:flex; align-items:center; justify-content:space-between; gap:20px; padding-top:11px; border-top:1px dashed #e2e8f0; }
.store-progress-error { margin-top:14px; line-height:1.55; }
.store-progress-waiting { padding:18px; border:1px dashed #cbd5e1; border-radius:10px; background:#f8fafc; color:#64748b; font-size:13px; line-height:1.6; text-align:center; }
.store-modal-captcha { display:grid; grid-template-columns:minmax(150px,1fr) minmax(150px,1fr) auto; align-items:end; gap:14px; padding:16px; border:1px solid #dbeafe; border-radius:11px; background:#f8fbff; }
.store-modal-captcha > div { display:grid; gap:5px; }
.store-modal-captcha img { width:160px; max-height:64px; object-fit:contain; border:1px solid #d7e0eb; border-radius:7px; background:#fff; }
.store-modal-captcha small { color:#718096; font-size:10px; }
.store-modal-captcha label { display:grid; gap:6px; color:#64748b; font-size:11px; font-weight:650; }
.store-modal-captcha input { box-sizing:border-box; width:100%; min-height:40px; padding:8px 10px; border:1px solid #cbd5e1; border-radius:7px; background:#fff; font:inherit; }
.store-modal-captcha button { min-height:40px; white-space:nowrap; }
.store-progress-actions { margin-top:4px; padding-top:18px; border-top:1px solid #edf0f4; }
@media (max-width:620px) { .store-progress-shell{padding:22px 18px 18px}.store-progress-metric{grid-template-columns:72px 1fr}.store-progress-metric>strong{grid-column:1/-1;text-align:left}.store-progress-account{padding:16px}.store-modal-captcha{grid-template-columns:1fr}.store-modal-captcha img{width:100%} }

/* v1.21 design system preview */
:root {
  --bg: #f3f6fa;
  --card: #ffffff;
  --border: #dfe5ec;
  --line: #dfe5ec;
  --text: #182230;
  --muted: #667085;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --surface-muted: #f8fafc;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 7px 20px rgba(16, 24, 40, .035);
  --shadow-float: 0 18px 50px rgba(15, 23, 42, .16);
  --radius-card: 14px;
  --radius-control: 9px;
}

body {
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: fixed;
  z-index: 2000;
  left: 16px;
  top: 12px;
  padding: 9px 13px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .18s ease;
}
.skip-link:focus { transform: translateY(0); }

.sidebar {
  position: relative;
  width: 264px;
  flex-basis: 264px;
  padding: 22px 14px 18px;
  border-right-color: #d9e2ec;
  background: #f8fafc;
  box-shadow: 8px 0 28px rgba(15, 23, 42, .025);
  transition: width .2s ease, flex-basis .2s ease, transform .2s ease;
}
.brand { padding: 2px 10px 22px; color: #175cd3; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  box-shadow: 0 7px 16px rgba(37, 99, 235, .22);
}
.sidebar-primary {
  min-height: 44px;
  margin-bottom: 22px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(145deg, #3478ed, #2563eb);
  box-shadow: 0 6px 15px rgba(37, 99, 235, .18);
  font-size: 14px;
}
.nav-label { padding-bottom: 7px; color: #98a2b3; font-size: 10px; letter-spacing: .12em; }
.nav-label-lower { margin-top: 22px; }
.sidebar nav { gap: 3px; }
.sidebar nav .nav-item {
  min-height: 40px;
  padding: 9px 11px;
  border-radius: 8px;
  color: #475467;
  font-size: 13px;
  font-weight: 600;
  transition: color .15s ease, background .15s ease, transform .15s ease;
}
.sidebar nav .nav-item:hover { background: #eef4ff; color: #175cd3; transform: translateX(2px); }
.sidebar nav .nav-item.active { background: #e7efff; color: #175cd3; box-shadow: inset 3px 0 #2563eb; }
.nav-parent { padding: 8px 11px 5px; color: #344054; font-size: 13px; }
.sidebar nav .nav-child { min-height: 32px; margin-left: 31px; padding: 6px 9px 6px 15px; font-size: 12px; }
.account-panel { margin-top: 22px; border-color: #e1e8f0; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .03); }
.sidebar-collapse-toggle {
  position: sticky;
  z-index: 3;
  top: 0;
  float: right;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: -7px -4px -28px 0;
  padding: 0;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  color: #667085;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .08);
  cursor: pointer;
}
.sidebar-collapse-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.sidebar-collapse-toggle:hover { border-color: #b8cdf5; color: var(--accent); }
.mobile-nav-toggle, .sidebar-scrim { display: none; }

.app-shell.sidebar-collapsed .sidebar { width: 78px; flex-basis: 78px; padding-left: 10px; padding-right: 10px; }
.app-shell.sidebar-collapsed .brand { justify-content: center; padding-left: 0; padding-right: 0; }
.app-shell.sidebar-collapsed .brand > span:last-child,
.app-shell.sidebar-collapsed .product-switch,
.app-shell.sidebar-collapsed .sidebar-primary-label,
.app-shell.sidebar-collapsed .nav-label,
.app-shell.sidebar-collapsed .nav-item span,
.app-shell.sidebar-collapsed .nav-parent span,
.app-shell.sidebar-collapsed .account-panel { display: none; }
.app-shell.sidebar-collapsed .sidebar-primary { min-width: 44px; padding: 0; }
.app-shell.sidebar-collapsed .sidebar nav .nav-item,
.app-shell.sidebar-collapsed .nav-parent { justify-content: center; padding-left: 0; padding-right: 0; }
.app-shell.sidebar-collapsed .sidebar nav .nav-child { display: none; }
.app-shell.sidebar-collapsed .nav-chevron, .app-shell.sidebar-collapsed .nav-children { display: none; }
.app-shell.sidebar-collapsed .sidebar nav .nav-item.active { box-shadow: inset 0 0 0 1px #bfd2fa; }
.app-shell.sidebar-collapsed .sidebar-collapse-toggle svg { transform: rotate(180deg); }
.app-shell.sidebar-collapsed .sidebar a.is-navigating::after { display: none; }

.container { padding: 26px clamp(20px, 2vw, 36px) 40px; scroll-behavior: smooth; }
.card {
  margin-bottom: 18px;
  padding: 22px 24px;
  border-color: var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.container > .card { animation: content-enter .2s ease both; }
.container > .card:nth-child(2) { animation-delay: .025s; }
.container > .card:nth-child(3) { animation-delay: .05s; }
@keyframes content-enter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.page-heading {
  padding: 24px 26px;
  border-color: #d9e5f2;
  background: linear-gradient(135deg, #fff 0%, #fbfdff 68%, #f3f7ff 100%);
}
.page-heading h1 { margin-bottom: 6px; font-size: 24px; line-height: 1.25; letter-spacing: -.02em; }
.page-heading > p { max-width: 980px; margin: 0; line-height: 1.65; }
.eyebrow { margin-bottom: 7px; color: #175cd3; font-size: 11px; letter-spacing: .1em; }
h1 { font-size: 24px; }
h2 { font-size: 17px; }
h3 { font-size: 14px; }
.muted { color: var(--muted); line-height: 1.6; }

.section-toolbar { margin-bottom: 16px; padding-bottom: 12px; border-bottom-color: #e7ecf2; }
.section-toolbar h2 { color: #1d2939; font-size: 17px; }
.analysis-filter { gap: 12px; }
.page-heading .analysis-filter {
  width: fit-content;
  max-width: 100%;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid #e1e8f0;
  border-radius: 11px;
  background: rgba(248, 250, 252, .84);
}
.analysis-filter label { gap: 6px; color: #475467; font-size: 11px; }
.analysis-filter input, .analysis-filter select,
.settings-form input, .settings-form select,
.modal-form-grid input, .modal-form-grid select,
.agency-form-grid input, .agency-form-grid select,
.agency-account-toolbar input, .agency-account-toolbar select {
  min-height: 40px;
  border-color: #d0d8e2;
  border-radius: var(--radius-control);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input:focus, select:focus, textarea:focus, details:focus-visible, summary:focus-visible {
  border-color: #84adff !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

button, .compact-button, .table-action, .secondary-link, .primary-button, .secondary-button {
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease, opacity .15s ease;
}
button:not(:disabled):hover, .compact-button:hover, .table-action:hover, .primary-button:hover { transform: translateY(-1px); }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(37, 99, 235, .22); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .5; }
.analysis-filter button, .compact-button, .table-action, .primary-button,
.agency-form-actions button, .agency-account-toolbar button, .modal-actions button {
  background: var(--accent);
  box-shadow: 0 2px 5px rgba(37, 99, 235, .16);
}
.analysis-filter button:not(:disabled):hover, .compact-button:hover, .table-action:hover,
.primary-button:hover, .agency-form-actions button:hover, .agency-account-toolbar button:hover,
.modal-actions button:not(.secondary):hover { background: var(--accent-hover); box-shadow: 0 5px 12px rgba(37, 99, 235, .2); }
.secondary-link, .secondary-button, button.secondary, .modal-actions button.secondary {
  border: 1px solid #cdd8e7;
  background: #fff;
  color: #344054;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}

.table-wrap {
  border: 1px solid #e4e9ef;
  border-radius: 11px;
  background: #fff;
}
table { font-size: 13px; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 12px; border-bottom-color: #eaecf0; }
thead th {
  position: sticky;
  z-index: 2;
  top: 0;
  background: #f8fafc;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .015em;
  box-shadow: inset 0 -1px #e4e9ef;
}
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: #f7faff; }
tbody tr:last-child > td, tbody tr:last-child > th { border-bottom: 0; }
.summary-row { background: #f3f7ff; }
.summary-row:hover { background: #eef4ff; }
#agency-account-table th:last-child, #agency-account-table td:last-child { position: sticky; z-index: 1; right: 0; background: inherit; box-shadow: -8px 0 14px rgba(15, 23, 42, .035); }
#agency-account-table thead th:last-child { z-index: 3; background: #f8fafc; }
.table-action { min-height: 30px; justify-content: center; border-radius: 7px; line-height: 1; }
.status-pill { padding: 4px 9px; }
.fusion-pagination { flex-wrap: wrap; gap: 8px; padding-top: 4px; }

.alert { border: 1px solid transparent; border-radius: 10px; line-height: 1.55; }
.alert.error { border-color: #fecaca; background: #fff1f2; }
.alert.success { border-color: #bbf7d0; background: #f0fdf4; }
.alert.warning { border-color: #fde68a; background: #fffbeb; }

.query-wait-card { border-radius: 16px; box-shadow: var(--shadow-float); }
.management-modal, .user-dialog { border-radius: 16px; box-shadow: var(--shadow-float); }
.management-modal::backdrop, .user-dialog::backdrop { background: rgba(15, 23, 42, .48); backdrop-filter: blur(4px); }
.modal-heading { padding-bottom: 14px; border-bottom: 1px solid #eaecf0; }
.modal-actions { position: sticky; bottom: 0; margin: 22px -22px -22px; padding: 14px 22px; border-top: 1px solid #e5e9ef; border-radius: 0 0 16px 16px; background: rgba(255, 255, 255, .96); }

/* Phase 2: fast, focused management workflows. */
.agency-account-toolbar { grid-template-columns: minmax(260px, 1fr) minmax(150px, .35fr) auto auto; }
.compact-button.disabled { pointer-events: none; opacity: .42; }
.management-modal {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(620px, calc(100vw - 24px));
  max-width: none;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  border-radius: 18px 0 0 18px;
  overflow: auto;
}
.management-modal-wide { width: min(820px, calc(100vw - 24px)); }
.management-modal-batch { width: min(980px, calc(100vw - 24px)); }
.management-modal[open] { animation: drawer-enter .2s cubic-bezier(.2,.8,.2,1); }
.management-modal > form, .management-modal > .management-modal-content { min-height: 100%; }
@keyframes drawer-enter { from { opacity: .65; transform: translateX(26px); } to { opacity: 1; transform: none; } }

.toast-region {
  position: fixed;
  z-index: 1300;
  top: 20px;
  right: 20px;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 14px 14px 16px;
  border: 1px solid #bbf7d0;
  border-left: 4px solid #16a34a;
  border-radius: 11px;
  background: #fff;
  color: #1f2937;
  box-shadow: var(--shadow-float);
  animation: toast-enter .2s ease both;
  pointer-events: auto;
}
.toast.error { border-color: #fecaca; border-left-color: #dc2626; }
.toast button { margin: -5px -5px 0 0; padding: 3px 7px; border: 0; background: transparent; color: #667085; box-shadow: none; font-size: 18px; }
.toast.is-leaving { animation: toast-leave .18s ease both; }
@keyframes toast-enter { from { opacity: 0; transform: translateY(-8px); } }
@keyframes toast-leave { to { opacity: 0; transform: translateY(-6px); } }

.query-wait-overlay {
  inset: auto 20px 20px auto;
  display: block;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
}
.query-wait-card {
  grid-template-columns: auto 1fr;
  justify-items: start;
  width: min(390px, calc(100vw - 32px));
  padding: 14px 16px;
  text-align: left;
}
.query-wait-spinner { grid-row: 1 / 3; width: 25px; height: 25px; margin: 2px 12px 0 0; }
.query-wait-card span:last-child { margin-top: 2px; }

/* Phase 3: decision-first profit report. */
.business-brief { margin-top: 20px; padding: 18px; border: 1px solid #dbe5f1; border-radius: 13px; background: rgba(255, 255, 255, .82); }
.business-brief-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.business-brief-heading h3 { margin: 0; padding: 0; border: 0; color: #1d2939; font-size: 15px; }
.business-health { padding: 5px 10px; border-radius: 999px; background: #ecfdf3; color: #067647; font-size: 11px; font-weight: 800; }
.business-health.status-slow, .business-health.status-risk { background: #fff4e5; color: #b54708; }
.business-brief-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.business-brief-grid article { padding: 14px; border: 1px solid #e6ebf1; border-radius: 10px; background: #fff; }
.business-brief-grid article > span { display: block; margin-bottom: 7px; color: #667085; font-size: 10px; font-weight: 750; letter-spacing: .06em; }
.business-brief-grid strong { display: block; color: #1d2939; font-size: 14px; }
.business-brief-grid p { margin: 5px 0 0; color: #667085; font-size: 11px; line-height: 1.55; }

.media-fusion-loading {
  min-height: 360px;
  display: grid;
  align-content: center;
  justify-content: stretch;
  gap: 28px;
  padding: clamp(28px, 5vw, 58px);
  background: linear-gradient(145deg, #fff 0%, #f8fbff 100%);
  text-align: left;
}
.media-fusion-loading-main { display: flex; align-items: center; justify-content: center; gap: 18px; }
.media-fusion-loading h2 { margin: 2px 0 7px; padding: 0; border: 0; font-size: 20px; }
.media-fusion-loading p { max-width: 680px; margin: 0 0 7px; }
.loading-eyebrow { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.media-fusion-stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 820px; width: 100%; margin: 0 auto; overflow: hidden; border: 1px solid #dbe4f0; border-radius: 10px; background: #fff; }
.media-fusion-stages span { position: relative; padding: 10px 12px; color: #98a2b3; font-size: 11px; font-weight: 700; text-align: center; }
.media-fusion-stages span + span { border-left: 1px solid #e7ecf2; }
.media-fusion-stages span.active { background: #eff6ff; color: #175cd3; }
.media-fusion-skeleton { display: grid; grid-template-columns: 1.4fr .8fr 1fr 1fr; gap: 10px; max-width: 920px; width: 100%; margin: 0 auto; }
.media-fusion-skeleton i { height: 12px; overflow: hidden; border-radius: 99px; background: #e9eef5; }
.media-fusion-skeleton i::after { display: block; width: 45%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.92), transparent); animation: skeleton-shimmer 1.25s ease-in-out infinite; content: ""; }
@keyframes skeleton-shimmer { from { transform: translateX(-120%); } to { transform: translateX(280%); } }

@media (max-width: 1280px) {
  .sidebar { width: 232px; flex-basis: 232px; }
  .container { padding-left: 22px; padding-right: 22px; }
  th, td { padding-left: 10px; padding-right: 10px; }
}

@media (max-width: 760px) {
  body { overflow: auto; }
  .management-modal, .management-modal-wide, .management-modal-batch { width: 100vw; max-width: 100vw; border-radius: 0; }
  .business-brief-grid { grid-template-columns: 1fr; }
  .toast-region { top: 12px; right: 12px; }
  .query-wait-overlay { right: 12px; bottom: 12px; }
  .app-shell { display: block; height: auto; min-height: 100vh; overflow: visible; }
  .sidebar {
    position: fixed;
    z-index: 1001;
    inset: 0 auto 0 0;
    width: min(300px, 86vw);
    height: 100vh;
    padding: 22px 14px;
    overflow-y: auto;
    border-right: 1px solid #d9e2ec;
    transform: translateX(-105%);
  }
  .app-shell.sidebar-collapsed .sidebar {
    width: min(300px, 86vw);
    flex-basis: auto;
    padding: 22px 14px;
  }
  .sidebar nav, .app-shell.sidebar-collapsed .sidebar nav { flex-direction: column; gap: 3px; overflow: visible; }
  .sidebar-primary, .nav-label { display: flex; }
  .nav-label { display: block; }
  .app-shell.sidebar-collapsed .brand { justify-content: flex-start; padding: 2px 10px 22px; }
  .app-shell.sidebar-collapsed .brand > span:last-child { display: inline; }
  .app-shell.sidebar-collapsed .sidebar-primary-label,
  .app-shell.sidebar-collapsed .nav-item span,
  .app-shell.sidebar-collapsed .nav-parent span { display: inline; }
  .app-shell.sidebar-collapsed .nav-label,
  .app-shell.sidebar-collapsed .account-panel { display: block; }
  .app-shell.sidebar-collapsed .sidebar-primary { min-width: 0; padding: 0 12px; }
  .app-shell.sidebar-collapsed .sidebar nav .nav-item,
  .app-shell.sidebar-collapsed .nav-parent { justify-content: flex-start; padding-left: 11px; padding-right: 11px; }
  .app-shell.sidebar-collapsed .sidebar nav .nav-child { display: flex; margin-left: 31px; padding: 6px 9px 6px 15px; }
  .app-shell.sidebar-collapsed .nav-children[hidden] { display: none !important; }
  .app-shell.sidebar-collapsed .nav-children:not([hidden]) { display: flex; }
  .app-shell.sidebar-collapsed .nav-chevron { display: block; }
  body.mobile-nav-open .sidebar { transform: translateX(0); }
  .sidebar-collapse-toggle { display: none; }
  .mobile-nav-toggle {
    position: fixed;
    z-index: 1000;
    top: 14px;
    left: 14px;
    display: grid;
    place-content: center;
    gap: 4px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #d7e0eb;
    border-radius: 11px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 7px 20px rgba(15,23,42,.12);
  }
  body.mobile-nav-open .mobile-nav-toggle { z-index: 1002; left: calc(min(300px, 86vw) - 56px); box-shadow: none; }
  .mobile-nav-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: #344054; transition: transform .18s ease, opacity .18s ease; }
  body.mobile-nav-open .mobile-nav-toggle span:first-child { transform: translateY(6px) rotate(45deg); }
  body.mobile-nav-open .mobile-nav-toggle span:nth-child(2) { opacity: 0; }
  body.mobile-nav-open .mobile-nav-toggle span:last-child { transform: translateY(-6px) rotate(-45deg); }
  .sidebar-scrim { position: fixed; z-index: 999; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(15,23,42,.4); }
  body.mobile-nav-open .sidebar-scrim { display: block; }
  body.mobile-nav-open { overflow: hidden; }
  .container { width: 100%; height: auto; padding: 72px 14px 28px; overflow: visible; }
  .card { padding: 18px 16px; border-radius: 12px; }
  .page-heading { padding: 20px 18px; }
  .page-heading h1 { font-size: 21px; }
  .page-heading .analysis-filter { width: 100%; }
  .page-heading .analysis-filter button { width: 100%; min-height: 42px; }
  .table-wrap { border-radius: 9px; }
  .media-fusion-loading { min-height: 320px; padding: 28px 18px; }
  .media-fusion-loading-main { align-items: flex-start; justify-content: flex-start; }
  .media-fusion-stages { grid-template-columns: repeat(2, 1fr); }
  .media-fusion-stages span:nth-child(3) { border-left: 0; border-top: 1px solid #e7ecf2; }
  .media-fusion-stages span:nth-child(4) { border-top: 1px solid #e7ecf2; }
  .media-fusion-skeleton { grid-template-columns: 1.4fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

.performance-preview-filter { display: flex; align-items: end; gap: 14px; flex-wrap: wrap; }
.performance-preview-filter label { display: grid; gap: 7px; min-width: 210px; color: #475467; font-weight: 600; }
.performance-preview-filter input, .performance-preview-filter select { min-height: 42px; }
.performance-preview-formulas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.performance-preview-formulas .card { margin: 0; }
.performance-preview-formulas h2 { margin: 8px 0; font-size: 28px; }
.performance-formula-line { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid #e7ecf2; color: #667085; }
.performance-incentive-form { display: grid; grid-template-columns: minmax(180px, 1fr) 160px minmax(220px, 1.5fr) auto; align-items: end; gap: 12px; margin-top: 18px; }
.performance-incentive-form label { display: grid; gap: 7px; color: #475467; font-weight: 600; }
.performance-incentive-form input { min-height: 42px; }
.performance-incentive-list { margin-top: 18px; }
.performance-incentive-list form { margin: 0; }
.table-action.danger { background: #b42318; }
.settlement-generate-form, .settlement-reopen-form, .settlement-confirm-form { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.settlement-reopen-form label, .settlement-confirm-form label { display: grid; gap: 7px; min-width: min(440px, 100%); color: #475467; font-weight: 600; }
.settlement-reopen-form input, .settlement-confirm-form input { min-height: 42px; }
@media (max-width: 760px) { .performance-preview-formulas { grid-template-columns: 1fr; } .performance-preview-filter label { width: 100%; } }
@media (max-width: 900px) { .performance-incentive-form { grid-template-columns: 1fr; } }
.checklist-stat-grid { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
.checklist-error { color: #b52d2d; }
.checklist-warning { color: #a56700; }
.checklist-success { color: #168447; }
.checklist-table td:nth-child(3), .checklist-table td:nth-child(4) { white-space: normal; min-width: 260px; line-height: 1.5; }
.checklist-details { margin: 0; padding-left: 18px; color: var(--muted); }
.checklist-details li + li { margin-top: 5px; }
@media (max-width: 760px) { .checklist-stat-grid { grid-template-columns: 1fr; } }

/* 趋势图图例支持显隐与键盘操作。 */
.lead-chart-legend [data-chart-series] { display:inline-flex; align-items:center; gap:5px; padding:4px 7px; border:1px solid transparent; border-radius:6px; background:transparent; box-shadow:none; color:inherit; font:inherit; cursor:pointer; transition:opacity .15s,background .15s,border-color .15s; }
.lead-chart-legend [data-chart-series]::before { display:inline-block; width:14px; height:3px; border-radius:3px; background:#94a3b8; content:""; }
.lead-chart-legend [data-chart-series]:hover { background:#f1f5f9; border-color:#e2e8f0; }
.lead-chart-legend [data-chart-series][aria-pressed="false"] { opacity:.4; text-decoration:line-through; }
.lead-chart-legend [data-chart-series]:focus-visible { outline:2px solid #2563eb; outline-offset:2px; }
@media (prefers-reduced-motion:reduce) { .lead-chart-legend [data-chart-series] { transition:none; } }

.lead-hourly-chart-card { grid-column:1 / -1; }

.lead-summary-row > :is(th, td) {
  background: #e7efff;
  border-top: 2px solid #9db8e7;
  font-weight: 750;
}
