:root {
    --sidebar: 232px;
    --app-footer: 34px;
    --line: #c8d8e3;
    --line-strong: #adbfcc;
    --panel-blue-1: #f7fafc;
    --panel-blue-2: #edf4f8;
    --panel-blue-3: #e3eef5;
    --panel-blue-4: #d8e8f2;
    --zebra-blue: #f0f6fa;
}

/* 直角化：保留头像、步骤序号、状态点和圆形图表的语义圆形。 */
*, *::before, *::after { border-radius: 0 !important; }
.user-avatar,
.person-avatar,
.step-title i,
.status-dot,
.health-mini > i,
.service-state i,
.risk-dot,
.sentiment-legend i,
.donut,
.donut > div { border-radius: 50% !important; }

body { background: var(--panel-blue-2); }

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.prototype-flag { border-radius: 0 !important; }
.sidebar { background: #e9f1f6; border-right-color: #b7cad7; }
.brand { background: var(--panel-blue-4); border-bottom-color: #b7cad7; }
.nav-groups { background: #eef4f8; }
.nav-group-toggle { color: #4f6e84; }
.nav-group-toggle:hover { background: #dceaf3; }
.nav-item:hover { background: #e0edf5; }
.nav-item.active { background: #d2e5f2; }
.sidebar-foot { background: #e4eef5; border-top-color: #b7cad7; }
.health-mini { background: #f5f9fb; border-color: #b9ccd8; }

.topbar {
    grid-template-columns: minmax(230px, 1fr) auto;
    background: #f8fbfd;
    border-bottom-color: #bccfdb;
}
.main-area {
    min-height: calc(100vh - var(--topbar) - var(--app-footer));
    flex: 1 0 auto;
    padding: 0;
    background: #edf3f7;
}
.page-view { margin: 0; }
.app-footer {
    min-height: var(--app-footer);
    flex: 0 0 var(--app-footer);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    border-top: 1px solid #b8ccd9;
    color: #667b89;
    background: #e4eef5;
    font-size: 10px;
    letter-spacing: .02em;
    white-space: nowrap;
}
.app-footer > i { width: 3px; height: 13px; background: var(--civic-blue, #176db3); }
.app-footer > b { width: 1px; height: 12px; background: #afc3d0; }
.app-footer a { color: #416f90; font-weight: 600; }
.app-footer a:hover { color: var(--civic-blue, #176db3); text-decoration: underline; text-underline-offset: 2px; }
.global-search,
.list-search { background: #fff; }

.review-tools { background: #f7fafc; border-color: #b8ccd9; }
.filter-tab[data-filter="web"],
.filter-tab[data-filter="web"] b {
    color: var(--danger, #b8323a);
}
.batch-toolbar { background: #e2edf4; border-color: #b8ccd9; }
.review-workspace {
    position: relative;
    height: calc(100vh - var(--topbar) - var(--app-footer) - 94px);
    --review-queue-width: 312px;
    --review-evidence-width: 360px;
    grid-template-columns: var(--review-queue-width) minmax(420px, 1fr) var(--review-evidence-width);
    border-color: #afc4d2;
    background: #fff;
    box-shadow: none;
}

.article-queue { background: #f3f7fa; border-right-color: #aec4d2; }
.panel-titlebar { background: #dceaf3; border-bottom-color: #b4c9d6; }
.queue-pagination { background: #e7f0f6; border-top-color: #b7cad7; }
.queue-item:nth-child(odd) { background: #fff; }
.queue-item:nth-child(even) { background: var(--zebra-blue); }
.queue-item:hover { background: #e4f0f7; }
.queue-item.active { background: #d6e9f5; box-shadow: inset 4px 0 var(--civic-blue); }

.article-reader {
    min-height: 0;
    display: block;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    background: #fff;
    border-right-color: #aec4d2;
}
.article-reader::-webkit-scrollbar { width: 10px; }
.article-reader::-webkit-scrollbar-track { background: #edf3f7; }
.article-reader::-webkit-scrollbar-thumb { min-height: 42px; border: 2px solid #edf3f7; background: #9eb8ca; }
.article-reader::-webkit-scrollbar-thumb:hover { background: #6f96b1; }
.reader-header { background: #edf5fa; border-bottom-color: #b8ccd9; }
.duplicate-note { background: #dcebf4; border-bottom: 1px solid #b9ccd8; }
.article-body { min-height: 360px; overflow: visible; background: #fff; }

.evidence-panel { background: #e8f1f6; }
.evidence-head { background: #d8e8f2; border-bottom-color: #adc3d1; }
.decision-steps { background: #e8f1f6; }
.decision-card,
.human-review { border-color: #b6cad7; box-shadow: none; }
.decision-card.traditional { background: #f7fafc; }
.decision-card.web { background: #e4f0f7; border-color: #a9c6d9; }
.human-review { background: #f0f5f8; }
.final-advice { box-shadow: none; }

.summary-line,
.advanced-filters,
.data-panel,
.event-metrics,
.analytics-kpis,
.keyword-overview,
.permission-summary,
.chart-panel,
.project-summary,
.date-strip,
.page-controls { border-color: #b8ccd9; box-shadow: none; }
.summary-line,
.advanced-filters,
.page-controls { background: #e8f2f8; }
.data-panel,
.chart-panel,
.project-summary { background: #f9fbfc; }
.section-title,
.data-toolbar,
.chart-panel > header,
.keyword-section > header { background: #e1edf5; border-bottom-color: #b8ccd9; }
.event-metrics > div:nth-child(odd),
.analytics-kpis > div:nth-child(odd),
.keyword-overview > div:nth-child(odd),
.permission-summary > div:nth-child(odd) { background: #f7fafc; }
.event-metrics > div:nth-child(even),
.analytics-kpis > div:nth-child(even),
.keyword-overview > div:nth-child(even),
.permission-summary > div:nth-child(even) { background: #e7f1f7; }

tbody tr:nth-child(odd) td { background: #fff; }
tbody tr:nth-child(even) td { background: var(--zebra-blue); }
tbody tr:hover td { background: #e2eff7; }
.event-cluster:nth-child(odd),
.settings-list > div:nth-child(odd),
.outline-list > div:nth-child(odd),
.account-line:nth-child(odd),
.efficiency-table > div:nth-child(odd):not(.efficiency-head) { background: #fff; }
.event-cluster:nth-child(even),
.settings-list > div:nth-child(even),
.outline-list > div:nth-child(even),
.account-line:nth-child(even),
.efficiency-table > div:nth-child(even):not(.efficiency-head) { background: var(--zebra-blue); }

.modal > header,
.modal footer { background: #e3eef5; }

/* 所有页面共用连续工作台布局，主导航、内容和页脚之间不再保留外层留白。 */
#view-news,
#view-warnings { margin: 0; }
#view-news .summary-line,
#view-news .advanced-filters,
#view-warnings .summary-line,
#view-warnings .advanced-filters {
    margin-bottom: 0;
}
#view-news .advanced-filters,
#view-news .data-panel,
#view-warnings .advanced-filters,
#view-warnings .data-panel {
    border-top: 0;
}

.audit-category-list {
    min-width: 170px;
    max-width: 300px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.audit-category-list span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 7px;
    border: 1px solid #9ebdd1;
    color: #123a63;
    background: #e3f0f8;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
}

.news-data-toolbar {
    min-height: 50px;
    flex-wrap: wrap;
    padding: 6px 12px;
}
.media-quick-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 10px;
    border-left: 1px solid #b8ccd9;
    white-space: nowrap;
}
.media-quick-filter > span {
    color: #557084;
    font-size: 11px;
    font-weight: 700;
}
.media-quick-options {
    display: inline-flex;
    border: 1px solid #9ebdd1;
    background: #f5f9fc;
}
.media-quick-options button {
    min-width: 52px;
    height: 30px;
    padding: 0 10px;
    border: 0;
    border-right: 1px solid #b8ccd9;
    color: #49677d;
    background: transparent;
    font-family: var(--font-sans-cn);
    font-size: 11px;
    cursor: pointer;
}
.media-quick-options button:last-child { border-right: 0; }
.media-quick-options button:hover,
.media-quick-options button:focus-visible {
    color: var(--civic-blue);
    background: #e3f0f8;
    outline: 0;
}
.media-quick-options button.active {
    color: #fff;
    background: var(--civic-blue);
    font-weight: 700;
}
.modal-body { background: #f7fafc; }

/* 项目级高亮关键词：城管蓝扫描感，不改变原文布局。 */
mark.cg-keyword-hit,
.article-body mark.cg-keyword-hit {
    display: inline;
    padding: .04em .18em;
    border: 1px solid #0d568f;
    color: #fff;
    background: #176db3;
    box-shadow: inset 0 -2px 0 #0a4777;
    font: inherit;
    font-weight: 800;
    line-height: inherit;
    text-shadow: 0 1px 0 rgba(0, 43, 79, .36);
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

mark.cg-keyword-hit.is-pulsing {
    animation: cg-keyword-scan .58s ease-in-out 2;
}

@keyframes cg-keyword-scan {
    0%, 100% {
        color: #fff;
        border-color: #0d568f;
        background: #176db3;
        box-shadow: inset 0 -2px 0 #0a4777;
    }
    45% {
        color: #fff;
        border-color: #62b4e8;
        background: #0b4f86;
        box-shadow: inset 0 -2px 0 #07395f, 0 0 0 3px rgba(98, 180, 232, .42);
    }
}

.highlight-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid #b8ccd9;
    background: #f9fbfc;
}
.highlight-summary > div {
    min-height: 74px;
    padding: 13px 17px;
    border-right: 1px solid #b8ccd9;
}
.highlight-summary > div:nth-child(even) { background: #e7f1f7; }
.highlight-summary > div:last-child { border-right: 0; }
.highlight-summary span,
.highlight-summary strong,
.highlight-summary small { display: block; }
.highlight-summary span { color: #617b8f; font-size: 11px; }
.highlight-summary strong { margin-top: 5px; color: #193b57; font-size: 20px; }
.highlight-summary small { margin-top: 4px; color: #7f929f; font-size: 10px; }
.highlight-keyword-panel { border-top: 0; }
.highlight-keyword-toolbar {
    min-height: 50px;
    padding: 7px 12px;
    background: #e1edf5;
}
.highlight-keyword-toolbar .read-only-note { white-space: nowrap; }
.highlight-rule-note {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 12px;
    border-bottom: 1px solid #b8ccd9;
    color: #536f83;
    background: #edf5fa;
    font-size: 11px;
}
.highlight-rule-note i {
    width: 4px;
    height: 20px;
    flex: 0 0 auto;
    background: #176db3;
}
.highlight-keyword-table td { height: 54px; }
.highlight-keyword-table td:first-child { min-width: 160px; }
.highlight-locations { display: inline-flex; gap: 5px; }
.highlight-locations b {
    padding: 3px 7px;
    border: 1px solid #b4d2e5;
    color: #315d7d;
    background: #edf6fb;
    font-size: 10px;
}
.highlight-row-actions { display: flex; align-items: center; gap: 4px; }
.highlight-row-actions button {
    min-width: 42px;
    height: 28px;
    padding: 0 7px;
    border: 1px solid #a9c3d4;
    color: #285a7e;
    background: #fff;
    font-family: var(--font-sans-cn);
    font-size: 10px;
    cursor: pointer;
}
.highlight-row-actions button:hover,
.highlight-row-actions button:focus-visible { border-color: #176db3; color: #176db3; background: #e8f4fb; outline: 0; }
.highlight-row-actions button.danger { color: #a42d35; }
.highlight-row-actions button.danger:hover,
.highlight-row-actions button.danger:focus-visible { border-color: #b8323a; color: #8f1f27; background: #fff0f1; }
.read-only-cell { color: #7a8d9b; font-size: 10px; }
.highlight-preview { gap: 7px !important; }
.highlight-preview > span { color: #718694; }
.highlight-keyword-modal { width: min(530px, 100%); }
.highlight-single-field > span,
.highlight-batch-field > span {
    display: block;
    margin-bottom: 7px;
    color: #38576e;
    font-size: 12px;
    font-weight: 700;
}
.highlight-single-field input,
.highlight-batch-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #aec4d2;
    color: #1b2d3d;
    background: #fff;
    font-family: var(--font-sans-cn);
    font-size: 13px;
    outline: 0;
}
.highlight-single-field input { height: 38px; padding: 0 10px; }
.highlight-batch-field textarea { min-height: 150px; padding: 9px 10px; line-height: 1.65; resize: vertical; }
.highlight-single-field input:focus,
.highlight-batch-field textarea:focus { border-color: #176db3; box-shadow: inset 3px 0 #176db3; }

/* 可拖拽分隔线 */
.layout-resizer {
    position: absolute;
    z-index: 30;
    width: 9px;
    cursor: col-resize;
    touch-action: none;
    user-select: none;
    outline: 0;
}
.layout-resizer::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 4px;
    width: 1px;
    background: #91adbf;
    transition: width .12s ease, left .12s ease, background .12s ease;
}
.layout-resizer:hover::after,
.layout-resizer:focus-visible::after,
body.layout-resizing .layout-resizer.active::after {
    left: 3px;
    width: 3px;
    background: var(--civic-blue);
}
.sidebar { overflow: visible; }
.sidebar-resizer { top: var(--topbar); right: -5px; bottom: 0; }
.queue-resizer { top: 0; bottom: 0; left: var(--review-queue-width); transform: translateX(-50%); }
.evidence-resizer { top: 0; right: var(--review-evidence-width); bottom: 0; transform: translateX(50%); }
.sidebar-collapsed .sidebar-resizer { display: none; }
body.layout-resizing { cursor: col-resize !important; user-select: none !important; }
body.layout-resizing * { cursor: col-resize !important; }
body.layout-resizing .sidebar { transition: none; }

.login-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
.login-shell { border: 0; }
.login-copyright {
    width: min(960px, calc(100vw - 40px));
    min-height: auto;
    flex-basis: auto;
    padding: 0;
    border: 0;
    color: rgba(255, 255, 255, .82);
    background: transparent;
    backdrop-filter: none;
}
.login-copyright > i,
.login-copyright > b { display: none; }
.login-copyright a { color: #d8efff; }
.login-copyright a:hover { color: #fff; }

@media (max-width: 600px) {
    .login-page { gap: 10px; }
    .login-copyright {
        min-height: 52px;
        flex-basis: 52px;
        flex-wrap: wrap;
        gap: 3px 8px;
        padding-block: 7px;
        white-space: normal;
        text-align: center;
    }
}

@media (max-width: 1400px) {
    .review-workspace {
        --review-queue-width: 285px;
        --review-evidence-width: 330px;
    }
}

@media (max-width: 1240px) {
    .review-workspace {
        --review-queue-width: 260px;
        --review-evidence-width: 310px;
        grid-template-columns: var(--review-queue-width) minmax(390px, 1fr) var(--review-evidence-width);
    }
}

@media (prefers-reduced-motion: reduce) {
    .layout-resizer::after { transition: none; }
    mark.cg-keyword-hit.is-pulsing { animation: none; }
}
