/* szzf.ai brand and compact workspace density. */
:root {
  --primary: #1268d4;
  --primary-soft: #eaf3ff;
  --ink: #122947;
  --muted: #60748e;
  --line: #dde6f0;
  --canvas: #f2f6fb;
  --radius: 8px;
  --navy: #051b39;
  --cyan: #15b5f6;
  --sidebar-width: 208px;
  --space-panel: 16px;
  --space-gap: 12px;
}
body { letter-spacing: -.15px; line-height: 1.45; }
h1 { font-size: 24px; letter-spacing: -.5px; line-height: 1.3; }
h2 { font-size: 14px; letter-spacing: -.2px; }
h3 { letter-spacing: -.15px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline-color: var(--primary); }
.sidebar {
  width: var(--sidebar-width); padding: 22px 12px 0; background: var(--navy);
  color: #d8e6f9; border-right: 1px solid #173456;
}
.brand { gap: 10px; padding: 0 9px; color: #f5fbff; font-size: 25px; letter-spacing: -.7px; }
.brand-mark {
  display: inline-flex; flex-shrink: 0; width: 44px; height: 44px;
  border-radius: 50%; overflow: hidden; background: var(--navy);
  box-shadow: 0 0 0 1px #167ed177;
}
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.065); }
.brand small { margin-top: 2px; font-size: 11px; color: #a6bfdb; letter-spacing: 0; font-weight: 400; }
.workspace { margin: 20px 0 19px; padding: 9px; gap: 8px; border-color: #223f5e; border-radius: 6px; background: #0c2749; }
.workspace small { color: #a4bbd5; margin-top: 2px; }
.workspace-logo { width: 29px; height: 29px; color: #70d4ff; background: #123b64; border: 1px solid #1c5280; letter-spacing: 0; }
.workspace-dot, nav .live-dot { background: #42c9fb; }
.nav-caption { padding: 0 11px; margin-bottom: 7px; letter-spacing: 0; color: #8faac8; font-size: 11px; }
nav { gap: 4px; }
nav a { padding: 0 11px; height: 39px; gap: 9px; color: #b5cae2; font-size: 13px; border-radius: 5px; }
nav a:hover { background: #102f52; color: #f0f8ff; }
nav a.active { color: #fff; background: #11457a; box-shadow: inset 3px 0 0 var(--cyan); }
nav a svg { width: 17px; height: 17px; }
.nav-count { color: #bfe4ff; background: #0c294a; border-color: #285782; font-size: 10px; padding: 1px 5px; }
.sidebar-bottom { padding-top: 24px; }
.agent-card { padding: 12px; margin-bottom: 14px; border: 1px solid #244664; background: #0c2949; border-radius: 7px; }
.agent-orb { margin-bottom: 9px; width: 27px; height: 27px; border-color: #25618b; background: #123958; color: #67d5ff; }
.agent-card strong { color: #d8edff; font-size: 11px; }
.agent-card p { color: #a5bdd4; margin-top: 5px; line-height: 1.6; font-size: 11px; }
.agent-card a { margin-top: 11px; color: #6ed9ff; font-size: 11px; }
.profile { padding: 13px 2px; border-top-color: #223e5c; gap: 8px; }
.profile small { color: #9bb6d3; margin-top: 2px; }
.profile .icon-button { color: #a7bed7; }
.profile .icon-button:hover { background: #153b61; color: #fff; }
.avatar, .small-avatar { color: #2261a9; background: #e4f1ff; border-color: #cbdff5; }
.app-shell { margin-left: var(--sidebar-width); }
.topbar { height: 52px; padding: 0 24px; }
.topbar-right { gap: 13px; }
.breadcrumb { color: #6b7d94; }
.slash { margin: 0 10px; }
.connection { color: #326392; }
.connection i { background: #108aeb; box-shadow: 0 0 0 3px #eaf4ff; }
.live-dot { background: #1288de; }
main { padding: 22px 24px 16px; max-width: 1720px; }
.page-heading { margin-bottom: 17px; gap: 16px; }
.eyebrow { letter-spacing: .2px; font-size: 10px; margin-bottom: 5px; color: #5e7b9d; }
.page-heading p { margin-top: 5px; line-height: 1.5; font-size: 12px; }
.heading-actions { padding-top: 0; gap: 8px; }
.button { min-height: 33px; padding: 6px 11px; font-size: 12px; border-color: #cedced; border-radius: 5px; color: #385677; }
.button:hover { background: #edf5ff; border-color: #83addb; }
.button.primary:hover { background: #0955b5; }
.stats-grid { gap: var(--space-gap); margin-bottom: var(--space-gap); }
.stat-card { padding: 13px 16px 12px; border-radius: var(--radius); }
.stat-top { font-size: 12px; color: #617691; }
.stat-icon { width: 26px; height: 26px; background: #edf5ff; border-color: #e2edfa; color: #3579c4; border-radius: 6px; }
.stat-number { font-size: 30px; letter-spacing: -.6px; margin: 8px 0; }
.stat-foot { font-size: 11px; line-height: 1.4; color: #60748e; gap: 4px; }
.stat-card:first-child { background: #eaf3ff; border-color: #ccdef5; }
.stat-card:first-child .stat-icon { background: #dbeaff; border-color: #cbdffc; color: #176bd4; }
.stat-card:first-child .stat-number { color: #105cbb; }
.row-grid { gap: var(--space-gap); margin-bottom: var(--space-gap); grid-template-columns: minmax(0,1.8fr) minmax(290px,1fr); }
.panel-head { padding: 14px var(--space-panel) 0; }
.panel-head p, .panel-subtitle { margin-top: 3px; font-size: 11px; line-height: 1.45; }
.segmented { padding: 2px; border-radius: 5px; }
.segmented button { font-size: 11px; padding: 4px 7px; }
.segmented button.active { background: #eaf3ff; }
.chart-legend { padding: 13px var(--space-panel) 0; font-size: 11px; gap: 14px; }
.legend-dot { background: #1589e8; }
.legend-dot.outlined { background: #9ec5ef; }
.trend { height: 107px; margin: 13px var(--space-panel) 0; background: repeating-linear-gradient(to top,transparent 0,transparent 25px,#edf2f8 26px,#edf2f8 27px); }
.trend-bar { background: #168aea; }
.trend-bar.sent { background: #9bc8f5; }
.trend-col:hover { background: #eaf3ff70; }
.chart-tooltip { background: #0c2a4e; font-size: 11px; }
.chart-labels { margin: 6px var(--space-panel) 0; font-size: 10px; }
.chart-note { margin: 9px var(--space-panel) 12px; font-size: 10px; line-height: 1.5; }
.distribution { gap: 22px; padding: 19px var(--space-panel) 16px; }
.donut { width: 113px; height: 113px; }
.donut:after { inset: 15px; }
.donut-value { font-size: 25px; }
.donut-value small { font-size: 10px; margin-top: 2px; }
.owner-legend { gap: 13px; }
.owner-line, .owner-line strong { font-size: 11px; }
.distribution-foot { margin: 0 var(--space-panel) 13px; padding-top: 9px; font-size: 10px; }
.text-link { font-size: 11px; }
.badge { padding: 3px 6px; border-radius: 4px; font-size: 11px; background: #eaf3ff; color: #2463a8; }
.badge.gray { background: #f0f3f8; color: #63758b; }
.campaign { padding: 15px var(--space-panel) 13px; }
.unsent-summary { margin: 14px var(--space-panel) 0; padding: 12px 14px; border: 1px solid #ead7ad; border-radius: 6px; background: #fff9ed; color: #775314; }
.unsent-count { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 12px; }
.unsent-count strong { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.unsent-summary p { margin-top: 4px; font-size: 11px; line-height: 1.7; }
.campaign-icon { width: 32px; height: 32px; border-radius: 6px; background: #edf5ff; border-color: #d8e7f8; color: #3983ca; }
.campaign-info h3 { font-size: 12px; line-height: 1.4; }
.campaign-info p { font-size: 10px; margin-top: 3px; }
.progress-label { margin: 12px 0 7px; font-size: 11px; }
.progress-track { height: 5px; background: #eaf0f8; }
.progress-track span { background: #168aeb; }
.campaign-metrics { padding-top: 12px; }
.campaign-metrics strong { font-size: 21px; margin-bottom: 2px; color: #173b66; }
.campaign-metrics span { font-size: 11px; }
.campaign-metrics .success strong { color: #1268d4; }
.campaign-hint { margin-top: 12px; padding: 7px 9px; font-size: 10px; line-height: 1.5; background: #f4f8fd; border-color: #e4ecf6; }
.template-list { padding: 4px var(--space-panel); }
.template-mini { padding: 12px 0; gap: 9px; }
.template-mini strong { font-size: 12px; }
.template-mini p { font-size: 10px; margin-top: 3px; }
.template-icon { width: 30px; height: 34px; border-radius: 5px; background: #eaf3ff; border-color: #d7e6f8; color: #5087c0; }
.template-mini:nth-child(2) .template-icon { background: #e9f7ff; border-color: #d4edf9; color: #3598c9; }
.template-mini:nth-child(3) .template-icon { background: #f0f3ff; border-color: #dfe4f9; color: #718cd0; }
.table-panel { margin-bottom: 12px; }
.table-panel .panel-head { padding-bottom: 12px; }
table { font-size: 12px; letter-spacing: -.15px; }
th { font-size: 11px; padding: 9px 16px; background: #f6f9fd; }
td { padding: 9px 16px; color: #435b78; }
.email-cell { color: #284d75; letter-spacing: -.1px; }
.email-avatar { width: 23px; height: 23px; font-size: 10px; margin-right: 8px; background: #eaf2fc; color: #4879b1; }
.table-foot { padding: 10px 16px; font-size: 11px; }
.page-footer { margin-top: 13px; font-size: 10px; }
.toolbar { gap: 10px; margin-bottom: 12px; }
input,select { min-height: 35px; padding: 7px 10px; border-radius: 5px; }
.search-field svg { top: 9px; }
.result-count,.check-label { font-size: 12px; }
.template-grid { gap: 14px; grid-template-columns: repeat(3,minmax(0,1fr)); }
.template-art { height: 122px; padding: 15px 36px 0; background: #e5f1ff; }
.template-card:nth-child(3n+2) .template-art { background: #e6f6ff; }
.template-card:nth-child(3n) .template-art { background: #edf0ff; }
.template-card-body { padding: 15px; gap: 9px; }
.template-card-body h3 { font-size: 13px; line-height: 1.4; }
.template-card-body p { font-size: 12px; line-height: 1.5; }
.template-card-meta { font-size: 11px; }
.template-card .button { margin-top: 3px; }
.info-strip { margin-bottom: 14px; padding: 9px 13px; line-height: 1.55; background: #eaf3ff; color: #4b6d94; border-color: #d7e5f7; }
.run-list { padding: 7px var(--space-panel); }
.run-row { padding: 9px 0; font-size: 12px; }
.run-row small { margin-top: 3px; font-size: 11px; }
.login-dialog { padding: 30px; border-radius: 12px; }
.login-dialog .brand-mark { width: 66px; height: 66px; margin-bottom: 18px; }
.login-dialog .eyebrow { color: #4874a4; font-size: 11px; letter-spacing: .2px; }
.login-dialog h2 { font-size: 23px; }
.login-dialog p { margin: 10px 0 20px; }
.login-dialog small { font-size: 11px; margin-top: 15px; }
dialog::backdrop { background: #031a3c66; }
.toast { background: #124d8a; }
@media(min-width:1600px) {
  .trend { height: 117px; }
  .distribution { padding-top: 22px; padding-bottom: 21px; }
}
@media(max-width:1200px) {
  :root { --sidebar-width: 190px; --space-panel: 14px; }
  .brand { font-size: 23px; gap: 8px; padding: 0 5px; }
  .brand small { font-size: 10px; }
  .brand-mark { width: 39px; height: 39px; }
  main { padding: 20px; }
  .topbar { padding: 0 20px; }
  .row-grid { grid-template-columns: minmax(0,1.5fr) minmax(260px,1fr); }
  .stat-card { padding: 12px; }
  .stat-foot { font-size: 10px; }
  .distribution { gap: 16px; }
  .donut { width: 102px; height: 102px; }
  .donut:after { inset: 14px; }
  .owner-legend { gap: 12px; }
}
@media(max-width:1000px) {
  :root { --sidebar-width: 180px; }
  .brand { font-size: 22px; }
  .brand small { font-size: 9px; }
  .brand-mark { width: 35px; height: 35px; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .row-grid { grid-template-columns: 1fr; }
  .owner-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: none; }
  .distribution { gap: 32px; padding: 15px 20px; }
  .template-list { display: block; }
  .template-mini { border-bottom: 1px solid var(--line); }
  .template-mini .arrow { display: block; }
  .template-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:760px) {
  .sidebar { width: 100%; padding: 9px 12px 0; border-bottom-color: #224668; }
  .brand { font-size: 22px; gap: 8px; padding: 0; }
  .brand-mark { width: 32px; height: 32px; }
  .brand small { display: inline; margin-left: 9px; font-size: 10px; letter-spacing: 0; }
  nav { margin-top: 9px; gap: 3px; }
  nav a { min-height: 41px; padding: 0 4px; height: 41px; gap: 5px; font-size: 11px; border-radius: 5px 5px 0 0; }
  nav a.active { box-shadow: inset 0 -2px 0 var(--cyan); }
  .app-shell { margin-left: 0; }
  .topbar { height: 39px; padding: 0 14px; }
  main { padding: 16px 12px 12px; }
  h1, .page-heading h1 { font-size: 22px; }
  .page-heading { margin-bottom: 14px; gap: 12px; }
  .page-heading p { font-size: 11px; }
  .eyebrow { font-size: 10px; margin-bottom: 4px; }
  .heading-actions { gap: 8px; }
  .page-heading .button { min-height: 36px; }
  .stats-grid { gap: 9px; margin-bottom: 10px; }
  .stat-card { padding: 11px 12px; }
  .stat-top { font-size: 11px; }
  .stat-number { font-size: 28px; margin: 8px 0; }
  .stat-foot { font-size: 10px; gap: 2px; }
  .row-grid { gap: 10px; margin-bottom: 10px; }
  .panel-head { padding: 12px 13px 0; }
  .panel-head p { font-size: 10px; }
  .segmented button { font-size: 10px; padding: 5px 6px; }
  .chart-legend { font-size: 10px; padding-top: 12px; }
  .trend { height: 105px; }
  .chart-note { font-size: 10px; }
  .distribution { gap: 26px; padding: 17px 20px; }
  .owner-legend { display: flex; gap: 12px; }
  .donut { width: 112px; height: 112px; }
  .distribution-foot { font-size: 10px; }
  .campaign { padding: 13px; }
  .campaign-info h3 { font-size: 11px; }
  .campaign-top { gap: 8px; }
  .campaign-metrics strong { font-size: 21px; }
  .campaign-metrics span { font-size: 10px; }
  .badge { font-size: 10px; }
  .template-list { padding: 3px 13px; }
  .template-mini { padding: 11px 0; }
  .template-mini strong { font-size: 11px; }
  .template-grid { gap: 10px; }
  .template-card-body { padding: 12px; }
  .template-art { height: 105px; padding: 13px 16px 0; }
  .template-card-body h3 { font-size: 12px; }
  .template-card-body p { font-size: 11px; }
  .template-card-meta { font-size: 10px; }
  .table-foot { padding: 9px 13px; font-size: 10px; }
  th,td { padding: 9px 13px; }
  .toolbar { gap: 8px; }
  input, select, .search-field input { min-height: 39px; font-size: 16px; }
  .toolbar select { font-size: 13px; }
  .search-field svg { top: 12px; }
  .result-count, .check-label { font-size: 11px; }
  .page-footer { gap: 6px; font-size: 10px; }
  .login-dialog { padding: 26px; }
}
/* Public contact collection, compact source cards and inspectable evidence. */
main[data-page="contacts"] { padding-top: 12px; }
main[data-page="contacts"] .page-heading { margin-bottom: 10px; align-items: center; }
main[data-page="contacts"] .page-heading > div:first-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
main[data-page="contacts"] .eyebrow { display: none; }
main[data-page="contacts"] .page-heading h1 { font-size: 22px; }
main[data-page="contacts"] .page-heading p { margin-top: 0; max-width: none; }
main[data-page="contacts"] .info-strip { padding: 5px 12px; margin-bottom: 8px; }
main[data-page="contacts"] .toolbar { margin-bottom: 8px; }
.company-panel { margin-bottom: 8px; }
.company-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; }
.company-heading > div:first-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.company-heading h2 { flex-shrink: 0; }
.company-heading p { color: var(--muted); font-size: 12px; line-height: 1.5; }
.contact-views { flex-shrink: 0; }
.contact-views button { min-height: 36px; padding: 7px 12px; font-size: 12px; }
.company-selection { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; overflow-wrap: anywhere; }
.company-identity { min-width: 220px; max-width: 320px; white-space: normal; overflow-wrap: anywhere; }
.company-identity strong { display: block; margin-bottom: 5px; font-size: 12px; font-weight: 600; color: var(--ink); line-height: 1.6; }
.company-identity .email-cell { font-size: 11px; }
.company-identity small { display: block; margin-top: 4px; line-height: 1.6; }
.company-cell small { margin-top: 4px; font-size: 11px; }
.company-open { min-height: 32px; white-space: nowrap; }
.company-sources { white-space: normal; min-width: 150px; }
#contact-rows .table-wrap:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
@media(max-width:760px) {
 main[data-page="contacts"] .page-heading { gap: 8px; }
 .company-heading { align-items: flex-start; flex-direction: column; padding: 10px 12px; gap: 8px; }
 .contact-views { width: 100%; }
 .contact-views button { flex: 1; min-height: 40px; }
 .company-selection { padding: 10px 13px; }
 #contact-count { flex-basis: 100%; margin-left: 0; }
}
.crawler-panel { margin-bottom: 8px; }
.crawler-panel .panel-head { padding: 8px 12px 0; flex-wrap: wrap; gap: 4px 12px; }
.crawler-panel .panel-head > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.crawler-panel .panel-head p { margin-top: 0; }
.crawler-panel h2 .badge { margin-left: 6px; vertical-align: middle; }
.crawler-total { color: var(--muted); font-size: 11px; }
.crawler-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; padding: 8px 12px 6px; }
.crawler-source { border: 1px solid var(--line); background: #f8fbff; border-radius: 6px; padding: 8px 10px; min-width: 0; }
.crawler-source-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.crawler-source-title a:hover { color: var(--primary); }
.crawler-source-stats { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; margin-top: 6px; }
.crawler-source-stats span { display: flex; align-items: baseline; gap: 4px; color: var(--muted); font-size: 10px; }
.crawler-source-stats strong { color: #1e5fa8; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.crawler-source p { font-size: 10px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.crawler-error { color: #9d622b; font-size: 11px; overflow-wrap: anywhere; margin-top: 7px; }
.crawler-error summary { cursor: pointer; }
.crawler-foot { padding: 0 12px 8px; font-size: 11px; color: var(--muted); line-height: 1.6; }
.evidence-dialog { width: min(680px,calc(100vw - 24px)); max-height: 85dvh; }
.evidence-entry { padding: 16px 22px; border-bottom: 1px solid var(--line); }
.evidence-entry .section-title { font-size: 11px; flex-wrap: wrap; }
.evidence-entry h3 { font-size: 13px; margin-top: 10px; }
.evidence-entry p { font-size: 12px; line-height: 1.7; margin: 9px 0; overflow-wrap: anywhere; color: #486380; }
#contact-evidence-title { overflow-wrap: anywhere; }
@media(max-width:1200px) { .crawler-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:760px) {
 .crawler-grid { gap: 8px; padding: 8px 12px 6px; }
 .crawler-total { display: none; }
 .crawler-source { padding: 8px; }
 .crawler-source-title { font-size: 11px; }
 .crawler-source-stats strong { font-size: 18px; }
 .crawler-foot { padding: 0 12px 8px; font-size: 10px; }
 .evidence-entry { padding: 14px; }
 .crawler-panel h2 .badge { font-size: 10px; }
}

/* 三类模板固定入口；日报日期在同一卡片内选择。 */
.template-categories .template-card-body{gap:14px}
.template-categories .template-card-body h3{font-size:18px}
.template-categories .template-card-body p{flex:none;min-height:42px;font-size:12px}
.template-categories .template-art{height:160px}
.template-categories .template-card .button{min-height:44px}
.template-edition,.template-subject{display:flex;flex-direction:column;gap:8px;min-height:100px;font-size:12px}
.template-edition select{width:100%;min-height:44px}
.template-subject span,.template-edition label{color:var(--muted)}
.template-subject strong{font-weight:500;line-height:1.8;overflow-wrap:anywhere}
.paper-poster{margin-top:10px;padding:17px 10px;background:#123968;color:#fff;text-align:center;font-size:17px;letter-spacing:2px}
.paper-poster small{display:block;margin-top:7px;font-size:8px;letter-spacing:1px;color:#dcecff}
@media(min-width:1100px){.template-categories{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.template-categories{grid-template-columns:1fr}.template-categories .template-card-body h3{font-size:18px}.template-categories .template-card-body p{min-height:0;font-size:13px}.template-categories .template-card-meta{flex-direction:row}.template-categories .template-art{height:120px}.template-edition,.template-subject{min-height:0}}

/* 模板工作区：左分类、中间正文、右发送记录。 */
.template-workspace{display:grid;grid-template-columns:190px minmax(0,1fr) 290px;gap:14px;height:calc(100dvh - 215px);min-height:540px;align-items:stretch}
.template-workspace .panel{margin:0;min-width:0;overflow:hidden}
.workspace-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:17px 16px;border-bottom:1px solid var(--line);flex:none}
.workspace-panel-heading h2{font-size:14px}
.template-navigation{display:flex;flex-direction:column}
.template-options{padding:10px;display:flex;flex-direction:column;gap:8px}
.template-option{display:flex;align-items:center;gap:10px;text-align:left;border:1px solid transparent;border-radius:8px;padding:14px 10px;min-height:76px;background:white;color:var(--ink);width:100%}
.template-option:hover{background:#f3f7fc}.template-option.active{background:#eaf3ff;border-color:#b7d5fb;color:#1456a8}
.template-option strong{font-size:13px;font-weight:600;display:block}.template-option small{display:block;font-size:10px;color:var(--muted);margin-top:6px;line-height:1.6}
.template-option-icon{flex:none;display:grid;place-items:center;width:28px;height:32px;color:#437bbb}.template-option-icon svg{width:21px;height:21px}
.template-navigation-note{margin:auto 14px 16px;font-size:11px;color:var(--muted);line-height:1.7}
.template-preview-panel{display:flex;flex-direction:column;background:white}
.template-preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;flex:none;font-size:12px;min-height:55px}
.template-preview-toolbar .text-link{display:flex;align-items:center;gap:5px;white-space:nowrap;min-height:36px}
.template-preview-toolbar svg{width:15px;height:15px}.template-date-label{display:flex;align-items:center;gap:10px;color:var(--muted);min-width:0}
.template-date-label select{min-width:0;max-width:100%;font-size:12px;min-height:36px;padding:6px 8px}
.template-preview-subject{padding:0 16px 14px;display:flex;gap:10px;line-height:1.7;font-size:12px;flex:none}
.template-preview-subject span{color:var(--muted);flex:none}.template-preview-subject strong{font-weight:500;overflow-wrap:anywhere}
#template-inline-frame{border:0;border-top:1px solid var(--line);width:100%;flex:1;min-height:0;background:#f4f6f9}
.template-records-panel{display:flex;flex-direction:column}
.template-record-context{padding:12px 14px 0;color:var(--muted);font-size:11px;display:flex;justify-content:space-between;gap:6px;flex:none}
.template-record-context span{font-size:10px;white-space:nowrap}
.template-record-summary{display:grid;grid-template-columns:1fr 1fr 1.5fr;gap:5px;padding:14px;flex:none}
.template-record-summary div{display:flex;flex-direction:column;gap:5px}.template-record-summary strong{font-size:23px;color:var(--ink);font-variant-numeric:tabular-nums}.template-record-summary span{font-size:10px;color:var(--muted)}
.template-record-search{position:relative;display:block;margin:0 12px 12px;flex:none}.template-record-search input{width:100%;padding:9px 10px 9px 32px;font-size:12px;min-height:38px}.template-record-search svg{position:absolute;left:10px;top:12px;width:14px;height:14px;color:var(--muted)}
.template-record-list{overflow:auto;flex:1;min-height:0;border-top:1px solid var(--line);padding:0 14px;overscroll-behavior:contain}
.template-delivery{padding:13px 0;border-bottom:1px solid var(--line);font-size:11px}.template-delivery-top{display:flex;align-items:flex-start;gap:6px;justify-content:space-between}.template-delivery-top strong{min-width:0;overflow-wrap:anywhere;font-size:12px;font-weight:500;line-height:1.6}.template-delivery-top .badge{flex:none;font-size:10px}.template-delivery time{display:block;color:var(--muted);font-size:10px;margin-top:5px}.template-delivery p{margin-top:5px;color:#915a30;overflow-wrap:anywhere;line-height:1.7}
.template-record-list .empty-state{padding:42px 6px;font-size:12px}
.template-record-pagination{padding:9px 12px;display:flex;align-items:center;justify-content:space-between;gap:5px;border-top:1px solid var(--line);font-size:10px;color:var(--muted);flex:none}.template-record-pagination div{display:flex;gap:4px}.template-record-pagination button{width:32px;height:32px}.template-record-note{padding:0 12px 12px;font-size:10px;color:var(--muted);flex:none}
@media(min-width:1600px){.template-workspace{grid-template-columns:220px minmax(0,1fr) 330px}}
@media(min-width:1100px){main[data-page="templates"] .page-footer{display:none}}
@media(max-width:1250px) and (min-width:1100px){.template-workspace{grid-template-columns:155px minmax(0,1fr) 245px;gap:10px}.template-option-icon{display:none}.template-preview-toolbar{flex-wrap:wrap}.template-option{padding:12px 7px}.template-date-label{gap:5px}}
@media(max-width:1099px){.template-workspace{grid-template-columns:minmax(0,1fr) 280px;grid-template-rows:auto minmax(650px,1fr);height:auto;min-height:0}.template-navigation{grid-column:1/-1}.template-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.template-navigation-note{display:none}.template-option{min-height:60px}.template-preview-panel,.template-records-panel{height:75dvh;min-height:650px}}
@media(max-width:760px){.template-workspace{display:flex;flex-direction:column;gap:12px}.workspace-panel-heading{padding:13px}.template-options{padding:8px;gap:5px}.template-option{padding:10px 5px;min-height:64px;justify-content:center}.template-option-icon,.template-option small{display:none}.template-option strong{font-size:12px}.template-preview-panel{height:72dvh;min-height:520px}.template-records-panel{height:560px;min-height:0}.template-preview-toolbar{padding:10px 12px;flex-wrap:wrap}.template-date-label{font-size:11px;gap:6px}.template-date-label select{font-size:13px;min-height:40px}.template-record-search input{font-size:16px}.template-record-list{padding:0 14px}.template-preview-subject{padding:0 12px 12px}.template-record-pagination button{width:40px;height:40px}}

/* 模板页极简头部，优先把高度留给正文。 */
body[data-page="templates"] .topbar{height:28px;min-height:28px;font-size:10px;padding:0 15px}
body[data-page="templates"] .topbar .small-avatar{width:22px;height:22px;font-size:10px}
main[data-page="templates"]{padding:8px 14px 10px}
main[data-page="templates"] .page-heading{margin-bottom:7px;min-height:28px;align-items:center;gap:8px}
main[data-page="templates"] .page-heading .eyebrow,main[data-page="templates"] #page-description{display:none}
main[data-page="templates"] .page-heading h1{font-size:17px;line-height:1.3;margin:0}
main[data-page="templates"] .heading-actions{padding:0;gap:6px}
main[data-page="templates"] .heading-actions .button{min-height:28px;padding:4px 9px;font-size:10px}
main[data-page="templates"] .template-workspace{height:calc(100dvh - 82px);min-height:440px}
.template-workspace .workspace-panel-heading{padding:8px 12px;min-height:35px}
.template-workspace .workspace-panel-heading h2{font-size:12px}
.template-preview-toolbar{padding:5px 12px;min-height:34px;gap:8px}
.template-date-label select{min-height:28px;padding:3px 7px;font-size:11px}
.template-preview-toolbar .text-link{min-height:28px;font-size:11px}
.template-preview-subject{padding:0 12px 6px;font-size:11px;line-height:1.5}
.template-option{min-height:58px;padding:9px 8px}.template-option small{margin-top:3px}.template-options{gap:5px;padding:8px}
.template-record-context{padding:7px 12px 0;font-size:10px}
.template-record-summary{padding:8px 12px;gap:5px}.template-record-summary strong{font-size:20px}.template-record-summary div{gap:2px}
.template-record-search{margin:0 10px 8px}.template-record-search input{min-height:30px;padding-top:5px;padding-bottom:5px;font-size:11px}.template-record-search svg{top:8px}
.template-send-actions{padding:0 10px 8px;flex:none}.template-send-actions .button{width:100%;min-height:34px;font-size:12px}
.template-send-dialog{width:min(740px,calc(100vw - 24px));max-height:90dvh;overflow:hidden}
.template-send-dialog[open]{display:flex;flex-direction:column}
.template-send-dialog .dialog-header{padding:13px 18px;flex:none}.template-send-dialog .dialog-header p{max-width:600px;overflow-wrap:anywhere}
.company-send-tools{display:flex;align-items:center;gap:14px;padding:12px 18px 6px;flex:none}.company-send-tools input{flex:1;min-width:0;font-size:13px}.company-send-tools .text-link{white-space:nowrap;min-height:36px;font-size:12px}
.company-send-note{padding:4px 18px 10px;color:var(--muted);font-size:11px;line-height:1.6;flex:none}
.send-company-list{overflow:auto;min-height:120px;max-height:55dvh;padding:0 18px;overscroll-behavior:contain}
.send-company{padding:10px 0;border-top:1px solid var(--line)}.send-company label{display:flex;align-items:center;gap:10px;min-height:40px;cursor:pointer}.send-company input{min-height:18px;width:18px;height:18px;flex:none;accent-color:var(--primary)}.send-company label>span{flex:1;min-width:0}.send-company strong{font-weight:500;font-size:13px;display:block;overflow-wrap:anywhere}.send-company small{display:block;font-size:11px;color:var(--muted);margin-top:5px;overflow-wrap:anywhere}.send-company b{font-size:12px;font-weight:500;color:var(--primary);white-space:nowrap}.send-company details{padding:5px 0 0 28px;font-size:11px;color:var(--muted)}.send-company summary{cursor:pointer;padding:3px 0}.send-company details div{display:flex;flex-wrap:wrap;gap:7px;margin-top:7px}.send-company details span{background:#f1f6fc;padding:4px 7px;border-radius:4px;overflow-wrap:anywhere}
.company-send-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 18px;border-top:1px solid var(--line);flex:none}.company-send-footer strong{font-size:13px;font-weight:500}.company-send-footer p{font-size:11px;color:#b24437;margin-top:5px;line-height:1.6}.company-send-footer button{min-height:42px;white-space:nowrap}
@media(max-width:1099px){main[data-page="templates"] .template-workspace{height:auto;min-height:0}}
@media(max-width:760px){main[data-page="templates"]{padding:7px 10px}main[data-page="templates"] .heading-actions{width:auto}main[data-page="templates"] .page-heading{flex-wrap:nowrap}main[data-page="templates"] .page-heading h1{font-size:16px}main[data-page="templates"] .heading-actions .button{min-height:32px;padding:4px 7px}main[data-page="templates"] #export{display:none}.template-record-search input{font-size:16px;min-height:36px}.template-record-search svg{top:11px}.company-send-tools{gap:8px;padding:8px 12px;flex-wrap:wrap}.company-send-tools input{flex-basis:100%;font-size:16px}.send-company-list{padding:0 12px}.company-send-note{padding:0 12px 8px}.company-send-footer{padding:10px 12px}.company-send-footer button{font-size:12px}.template-send-dialog .dialog-header{padding:12px}.template-date-label select{font-size:13px;min-height:34px}}

/* 发送侧栏：一次聚焦一个任务，列表独立滚动，操作固定在底部。 */
.template-workspace .template-records-panel{overflow:hidden}
.send-panel-header{padding:16px 14px 12px;flex:none}
.send-panel-header>div{display:flex;align-items:center;justify-content:space-between;gap:8px}
.send-panel-header h2{font-size:15px}
.send-panel-header p{margin-top:7px;font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.send-panel-live{display:flex;align-items:center;gap:5px;font-size:11px;color:var(--muted)}
.send-panel-live i{width:6px;height:6px;border-radius:50%;background:#248458}
.send-panel-tabs{display:flex;flex:none;gap:4px;padding:4px;margin:0 14px 4px;background:var(--canvas);border-radius:8px}
.send-panel-tabs button{flex:1;border:0;border-radius:5px;min-height:36px;background:transparent;color:var(--muted);font-size:13px;font-weight:500;cursor:pointer}
.send-panel-tabs button[aria-selected="true"]{background:white;color:var(--primary);box-shadow:0 1px 4px #12294718}
.send-panel-tabs button:hover{color:var(--primary)}
.send-panel-tabs button:focus-visible,.subscription-groups button:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.template-records-panel [hidden]{display:none!important}
.daily-subscriptions,.inline-company-send,.inline-send-records{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
.send-section-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:16px 14px 10px;flex:none}
.send-section-heading h3{font-size:13px;font-weight:600}
.send-section-heading .badge{font-size:11px}
.subscription-groups{display:flex;gap:16px;margin:0 14px 10px;border-bottom:1px solid var(--line);flex:none}
.subscription-groups button{border:0;border-bottom:2px solid transparent;min-height:34px;padding:0 0 7px;background:transparent;color:var(--muted);font-size:12px;cursor:pointer}
.subscription-groups button[aria-pressed="true"]{border-bottom-color:var(--primary);color:var(--primary);font-weight:600}
.subscription-groups span{margin-left:4px;font-variant-numeric:tabular-nums}
.subscription-tools{display:flex;align-items:center;gap:10px;padding:0 14px;flex:none}
.subscription-tools input{flex:1;min-width:0}
.subscription-tools input,.inline-company-send .company-send-tools input,.template-record-search input{min-height:38px;font-size:12px;padding:8px 10px}
.subscription-tools button{min-height:36px;font-size:12px;flex:none}
.subscription-summary{padding:9px 14px;color:var(--muted);font-size:11px;line-height:1.6;flex:none}
.subscription-list{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 14px}
.subscription-row{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:13px 0;border-top:1px solid var(--line)}
.subscription-address{flex:1;min-width:0}
.subscription-address strong{font-size:12px;font-weight:500;line-height:1.7;overflow-wrap:anywhere}
.subscription-address small{display:block;color:var(--muted);font-size:11px;margin-top:4px;line-height:1.6}
.subscription-row .badge{flex:none;font-size:10px;margin-top:2px}
.subscription-delivery-error{color:var(--red);font-size:11px;overflow-wrap:anywhere;margin-top:4px}
.subscription-delivery.success{background:#e8f5ed;color:#17633b}
.subscription-delivery.failed{background:#fff0ee;color:#a62c26}
.subscription-delivery.pending{background:#eaf3ff;color:#2463a8}
.subscription-delivery.none{background:#f0f3f8;color:#63758b}
.subscription-error{font-size:12px;color:var(--red);line-height:1.7}
.subscription-error button{display:block;min-height:36px}
.subscription-send-footer,.inline-company-send .company-send-footer{display:block;flex:none;padding:12px 14px;border-top:1px solid var(--line);background:#fafcfe}
.subscription-send-footer p,.inline-company-send .company-send-footer strong{font-size:12px;font-weight:400;color:var(--muted);line-height:1.6}
.subscription-send-footer .button,.inline-company-send .company-send-footer .button{width:100%;min-height:40px;margin-top:8px;font-size:13px;justify-content:center}
.template-records-panel .send-footer-note{font-size:11px;font-weight:400;line-height:1.7;color:var(--muted);padding:0;margin-top:8px}
#subscription-send-error,#send-company-error{font-size:12px;color:var(--red);overflow-wrap:anywhere;line-height:1.6}
#subscription-send-error:empty,#send-company-error:empty{display:none}
.inline-company-send .company-send-tools{display:block;padding:0 14px;flex:none}
.inline-company-send .company-send-tools input{width:100%}
.inline-company-send .company-send-tools>div{display:flex;align-items:center;gap:16px;padding-top:3px}
.inline-company-send .company-send-tools .text-link{min-height:34px;font-size:12px}
#send-reload{margin-left:auto}
.company-send-counts{padding:0 14px 10px;font-size:11px;color:var(--muted);line-height:1.6;flex:none}
.inline-company-send .send-company-list{flex:1;min-height:0;max-height:none;padding:0 14px}
.inline-company-send .send-company{padding:12px 0}
.send-company-heading{display:flex;align-items:center;gap:8px}
.send-company-heading>label{flex:1;min-width:0;gap:9px;min-height:40px}
.send-company strong{font-size:12px;font-weight:500;line-height:1.5}
.send-company small{font-size:11px;margin-top:3px}
.company-eligible{flex:none;font-size:11px;color:var(--primary);font-variant-numeric:tabular-nums;white-space:nowrap}
.company-eligible.is-empty{color:var(--muted)}
.send-company-other{margin:5px 0 0 27px;font-size:11px;line-height:1.6;color:var(--muted)}
.send-company label:has(input:disabled){cursor:default}
.send-company details{padding:4px 0 0 27px;font-size:11px}
.send-company summary{min-height:26px}
.send-company details div{gap:5px}
.send-company details span{max-width:100%}
.send-company details .send-recipient-chip{position:relative;padding:7px 30px 7px 8px;line-height:1.6}
.send-recipient-remove{position:absolute;right:1px;top:1px;width:24px;height:24px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--muted);font-size:17px;line-height:24px;cursor:pointer}
.send-recipient-remove:hover{background:#ffe7e3;color:#a62c26}
.send-recipient-remove:focus-visible{outline:2px solid var(--primary);outline-offset:1px}
.send-removed-summary{display:flex;align-items:center;justify-content:space-between;gap:8px}
.send-removed-summary .text-link{min-height:28px;font-size:12px}
.template-record-summary{padding:2px 14px 14px;gap:8px}
.template-record-summary strong{font-size:22px}
.template-record-summary span{font-size:11px;line-height:1.5}
.template-record-search{margin:0 14px 12px}
.template-record-search input{padding-left:32px}
.template-record-search svg{top:12px}
.template-record-list{border-top:0}
.template-delivery{border-top:1px solid var(--line);border-bottom:0}
.template-delivery time{font-size:11px}
.template-record-pagination{padding:6px 14px;font-size:11px}
.template-record-note{padding:10px 14px;border-top:1px solid var(--line);font-size:11px;line-height:1.6}
.template-records-panel .empty-state{padding:36px 8px;font-size:12px;line-height:1.7}
.template-records-panel .empty-state svg{width:28px;height:28px;margin-bottom:10px}
@media(max-width:760px){
 .template-records-panel{height:620px;min-height:0}
 .send-panel-tabs button,.subscription-groups button,.subscription-tools button,.inline-company-send .company-send-tools .text-link{min-height:40px}
 .subscription-tools input,.inline-company-send .company-send-tools input,.template-record-search input{font-size:16px;min-height:42px}
 .template-record-search svg{top:14px}
 .subscription-send-footer .button,.inline-company-send .company-send-footer .button{min-height:44px}
}
