:root {
  --news-sidebar-width: 286px;
  --news-sidebar-collapsed: 56px;
  --news-bg: #f4f7fa;
  --news-panel: #ffffff;
  --news-line: #e2e8f0;
  --news-line-soft: #edf1f5;
  --news-ink: #1e293b;
  --news-muted: #64748b;
  --news-subtle: #94a3b8;
  --news-accent: #0f766e;
  --news-accent-blue: #2563eb;
}

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body.news-workbench-body,
body.news-workbench-body #back-to-top-component {
  background: var(--news-bg) !important;
  color: var(--news-ink);
}

body.news-workbench-body { min-height: 100vh; overflow-x: hidden; }

.news-workbench-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 60; display: flex;
  width: var(--news-sidebar-width); flex-direction: column;
  border-right: 1px solid var(--news-line); background: #f8fafc;
  color: #334155; transition: width .24s ease, transform .24s ease;
}

.news-sidebar-brand {
  display: flex; min-height: 78px; align-items: center; gap: .75rem;
  border-bottom: 1px solid var(--news-line); padding: 0 1rem;
}

.news-brand-mark {
  display: inline-flex; height: 2.5rem; width: 2.5rem; flex: 0 0 2.5rem;
  align-items: center; justify-content: center; border-radius: .75rem;
  background: transparent; color: var(--news-accent); font-size: 1.05rem;
}
.news-brand-mark img { display: block; height: 2.35rem; width: 2.35rem; object-fit: contain; }

.news-brand-copy { display: flex; min-width: 0; flex: 1; align-items: center; }
.news-brand-copy strong { overflow: hidden; color: #1e293b; font-size: 1.05rem; font-weight: 800; letter-spacing: .04em; text-overflow: ellipsis; white-space: nowrap; }

.news-sidebar-toggle,
.news-icon-button {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; background: transparent; color: var(--news-muted);
  cursor: pointer; transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.news-sidebar-toggle { height: 2rem; width: 2rem; flex: 0 0 2rem; border-radius: .5rem; }
.news-sidebar-toggle:hover, .news-icon-button:hover { border-color: #cbd5e1; background: #fff; color: var(--news-accent-blue); }

.news-sidebar-scroll { min-height: 0; flex: 1; overflow-y: auto; padding: 1.25rem .75rem 1rem; scrollbar-color: #cbd5e1 transparent; scrollbar-width: thin; }
.news-sidebar-section-label { margin: 0 .5rem .55rem; color: var(--news-subtle); font-size: .62rem; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.news-sidebar-section-label-spaced { margin-top: 1.65rem; }
.news-sidebar-nav { display: grid; gap: .25rem; }

.news-sidebar-nav-item {
  position: relative; display: flex; width: 100%; min-height: 42px; align-items: center; gap: .7rem;
  border: 1px solid transparent; border-radius: .6rem; padding: 0 .68rem; color: #526476;
  background: transparent; font-size: .86rem; font-weight: 650; text-align: left; cursor: pointer;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.news-sidebar-nav-item:hover { border-color: transparent; background: #eef4f8; color: #1e3a5f; }
.news-sidebar-nav-item.is-active { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.news-sidebar-nav-item-muted, .news-sidebar-nav-item-muted:hover { color: #94a3b8; background: transparent; cursor: default; }
.news-sidebar-nav-icon { display: inline-flex; width: 1.25rem; flex: 0 0 1.25rem; align-items: center; justify-content: center; color: #94a3b8; font-size: .85rem; }
.news-sidebar-nav-item.is-active .news-sidebar-nav-icon { color: var(--news-accent-blue); }
.news-sidebar-label { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-sidebar-soon { color: #a8b3bf; font-size: .6rem; font-weight: 500; }
.news-workbench-sidebar a.news-sidebar-nav-item { text-decoration: none; }

.news-sidebar-login { min-height: 68px; border-top: 1px solid var(--news-line) !important; padding: .5rem; }

.news-workbench-main { min-height: 100vh; min-width: 0; margin-left: var(--news-sidebar-width); transition: margin-left .24s ease; }
.news-mobile-bar { display: none; }

.news-workbench-content { width: min(1680px,100%); min-height: 100vh; margin: 0 auto; padding: 1.65rem 1.875rem 3rem; }
.news-page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.1rem; }
.news-page-heading h1 { margin: 0; color: #1d2b38; font-size: 1.55rem; font-weight: 800; letter-spacing: -.01em; }
.news-page-heading p { max-width: 720px; margin: .35rem 0 0; color: #738596; font-size: .75rem; line-height: 1.65; }
.news-page-summary { display: flex; align-items: baseline; gap: .35rem; color: #82909d; font-size: .7rem; white-space: nowrap; }
.news-page-summary strong { color: #1e3a5f; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.news-summary-label { color: #94a3b8; }

.news-list-workspace { overflow: visible; border: 1px solid var(--news-line); border-radius: .75rem; background: var(--news-panel); box-shadow: 0 10px 26px rgba(15,23,42,.035); }
.news-table-wrap { overflow: visible; }

#newsTable { width: 100%; color: #334155; }
#newsTable thead { background: #f8fafc; }
#newsTable thead th { height: 3.15rem; border-bottom: 1px solid var(--news-line); padding: .65rem .85rem !important; color: #526476; vertical-align: middle; }
#newsTable tbody tr { border-bottom: 1px solid var(--news-line-soft); background: #fff; transition: background .15s ease; }
#newsTable tbody tr:hover { background: #f8fbff; }
#newsTable tbody tr:last-child { border-bottom: 0; }
#newsTable tbody td { padding: .85rem !important; color: #526476; font-size: .75rem; line-height: 1.5; vertical-align: middle; }
#newsTable tbody td:first-child { width: 54%; color: #1e293b; }
#newsTable tbody tr:not(.news-mobile-row) td:first-child a, #newsTable tbody tr:not(.news-mobile-row) td:first-child span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.5; }
.news-mobile-title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.5; }
#newsTable tbody td:first-child a { color: #1e3a5f; font-size: .92rem; font-weight: 750; text-decoration: none; }
#newsTable tbody td:first-child a:hover { color: #1d4ed8; text-decoration: underline; text-underline-offset: 3px; }
#newsTable tbody td[data-label="发布时间"] { text-align: center; font-variant-numeric: tabular-nums; }
#newsTable tbody td[data-label="来源"] { max-width: 14rem; }
#newsTable tbody td[data-label="区域"] { white-space: nowrap; }
#newsTable .news-from-label { display: inline-flex; max-width: 100%; align-items: center; gap: .4rem; }
#newsTable .news-from-label span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#newsTable .news-mobile-chip i { line-height: 1.5; }
.news-pagination { border-top: 1px solid var(--news-line-soft); padding: .7rem 1rem; }
.news-pagination .pagination-container, .news-pagination > div { color: #64748b; font-size: .72rem; }

#newsMobileOverlay { position: fixed; inset: 0; z-index: 50; background: rgba(15,23,42,.42); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .16s ease, visibility 0s linear .16s; }
#newsMobileOverlay.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .16s ease; }
.news-mobile-sidebar-backdrop { display: none; }

body.news-sidebar-collapsed .news-workbench-sidebar { width: var(--news-sidebar-collapsed); }
body.news-sidebar-collapsed .news-workbench-main { margin-left: var(--news-sidebar-collapsed); }

@media (min-width: 1024px) {
  body.news-sidebar-collapsed .news-brand-copy,
  body.news-sidebar-collapsed .news-sidebar-section-label,
  body.news-sidebar-collapsed .news-sidebar-label,
  body.news-sidebar-collapsed .news-sidebar-soon,
  body.news-sidebar-collapsed .news-sidebar-login span,
  body.news-sidebar-collapsed .news-sidebar-login [data-role="guest-section"] span,
  body.news-sidebar-collapsed .news-sidebar-login [data-action="toggle-menu"] span { display: none; }
  body.news-sidebar-collapsed .news-sidebar-brand, body.news-sidebar-collapsed .news-sidebar-login { justify-content: center; gap: 0; padding-right: 0; padding-left: 0; }
  body.news-sidebar-collapsed .news-brand-mark { display: none; }
  body.news-sidebar-collapsed .news-sidebar-nav-item { justify-content: center; gap: 0; padding: 0; }
  body.news-sidebar-collapsed .news-sidebar-login [data-role="guest-section"] > a,
  body.news-sidebar-collapsed .news-sidebar-login [data-action="toggle-menu"] {
    display: flex;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
    gap: 0;
    border-radius: 999px;
    padding: 0 !important;
  }
  body.news-sidebar-collapsed .news-sidebar-login [data-role="guest-section"] > a > i,
  body.news-sidebar-collapsed .news-sidebar-login [data-action="toggle-menu"] > i { display: none; }
  body.news-sidebar-collapsed .news-sidebar-login img { width: 2.15rem; height: 2.15rem; }
  body.news-sidebar-collapsed .news-sidebar-login [data-role="user-dropdown"] { width: 2.5rem; margin: 0 auto; }
}

@media (max-width: 1023px) {
  .news-workbench-sidebar, body.news-sidebar-collapsed .news-workbench-sidebar { width: min(286px,calc(100vw - 42px)); transform: translateX(-105%); }
  body.news-sidebar-mobile-open .news-workbench-sidebar { transform: translateX(0); box-shadow: 22px 0 55px rgba(15,23,42,.16); }
  .news-workbench-main, body.news-sidebar-collapsed .news-workbench-main { margin-left: 0; }
  .news-mobile-bar { position: sticky; top: 0; z-index: 45; display: flex; min-height: 54px; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--news-line); background: #fff; padding: .65rem 1rem; }
  .news-mobile-bar strong { color: #334155; font-size: .82rem; }
  .news-icon-button { height: 2.15rem; width: 2.15rem; border-color: #cbd5e1; border-radius: .5rem; background: #fff; }
  .news-mobile-sidebar-backdrop { position: fixed; inset: 0; z-index: 55; display: block; background: rgba(15,23,42,.42); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  body.news-sidebar-mobile-open .news-mobile-sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .news-workbench-content { min-height: calc(100vh - 54px); padding: 1.15rem 1rem 2rem; }
  .news-page-heading { align-items: flex-start; }
  .news-page-heading h1 { font-size: 1.35rem; }
}

@media (max-width: 639px) {
  .news-page-heading { display: block; margin-bottom: .9rem; }
  .news-page-heading p { font-size: .7rem; }
  .news-page-summary { margin-top: .7rem; }
  #newsTable, #newsTable tbody, #newsTable tr, #newsTable td { display: block; width: 100%; }
  #newsTable thead, #newsTable thead tr, #newsTable thead th { display: block; width: 100%; }
  #newsTable thead th { height: auto; padding: .5rem .65rem !important; }
  #newsTable tbody tr.news-mobile-row { border-bottom: 1px solid var(--news-line-soft); }
  #newsTable tbody td.news-mobile-cell { padding: .9rem .75rem !important; }
  #newsTable tbody td:first-child { width: 100%; }
  #newsTable tbody .news-mobile-chip { min-width: 0; }
  .news-pagination { padding: .65rem .75rem; }
}

#titleFilterPanel, #publishTimeFilterPanel, #fromFilterMenu, #newsProvincePickerPanel { border-color: #d8e0e8 !important; border-radius: .65rem !important; box-shadow: 0 18px 42px rgba(15,23,42,.16) !important; }
#newsProvincePicker { --province-picker-accent: #0f766e; }
#newsProvincePickerTrigger { min-height: 2.25rem; border-radius: 9999px; gap: .375rem; padding: .375rem .5rem; color: #64748b; font-size: .75rem; font-weight: 600; }
#newsProvincePickerTrigger::before { content: "\f3c5"; font-family: "Font Awesome 6 Free"; font-weight: 900; display: inline-flex; flex: none; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 9999px; background: #f1f5f9; color: currentColor; font-size: .75rem; }
@media (min-width: 640px) {
  #newsProvincePickerTrigger { min-height: 2.5rem; gap: .5rem; padding: .375rem .625rem; font-size: .875rem; }
  #newsProvincePickerTrigger::before { width: 1.75rem; height: 1.75rem; }
}
#newsProvincePickerTrigger:not(.province-picker__trigger--placeholder) { border-color: #bbf7d0; color: #047857; }
#newsProvincePickerPanel { width: min(26rem, calc(100vw - 2rem)) !important; left: auto !important; right: 0 !important; }

@media (max-width: 639px) {
  #titleFilterPanel, #publishTimeFilterPanel, #fromFilterMenu, #newsProvincePickerPanel { position: fixed !important; top: 4.7rem !important; right: .75rem !important; left: .75rem !important; z-index: 70 !important; width: auto !important; max-width: none !important; }
  #newsTable .news-title-filter, #newsTable .news-publish-time-filter, #newsTable .news-from-filter, #newsTable .news-region-filter { width: 100%; }
}
