:root {
  --major: #1e50ae;
  --major-dark: #163d88;
  --text: #333;
  --muted: #666;
  --line: #e5e5e5;
  --bg: #f5f5f5;
  --site-width: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", SimHei, Arial, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.6;
  font-size: 14px;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--major); }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }

.wrap {
  width: var(--site-width);
  max-width: 100%;
  margin: 0 auto;
  padding: 0 12px;
}

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  position: relative;
  z-index: 100;
}
.brand-bar {
  height: 88px;
  display: flex;
  align-items: center;
}
.brand-title {
  color: var(--major);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
}
.brand-title:hover { color: var(--major-dark); }

/* Nav - 全宽蓝底，七项完整展示 */
.main-nav {
  background: var(--major);
  min-height: 54px;
  width: 100%;
}
.nav-inner {
  min-height: 54px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 0;
}
.nav-item {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #fff !important;
  padding: 0 10px;
  white-space: nowrap;
  font-size: 15px;
  position: relative;
  transition: background .2s;
  text-align: center;
}
.nav-item:hover,
.nav-item.active {
  background: rgba(0,0,0,.18);
  color: #fff !important;
}
.nav-item .icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-item .icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.nav-item .nav-label {
  display: inline-block;
  line-height: 1.2;
}
.nav-item + .nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: rgba(255,255,255,.22);
}

@media (max-width: 1100px) {
  .nav-item { font-size: 13px; padding: 0 6px; gap: 4px; }
  .nav-item .icon { width: 16px; height: 16px; }
  .nav-item .icon svg { width: 16px; height: 16px; }
}
@media (max-width: 800px) {
  .nav-inner { overflow-x: auto; justify-content: flex-start; }
  .nav-item { flex: 0 0 auto; padding: 0 14px; font-size: 14px; }
}

/* Banner */
.banner {
  position: relative;
  height: 420px;
  overflow: hidden;
  background: #0d1f4a;
}
.banner-track {
  display: flex;
  height: 100%;
  transition: transform .6s ease;
}
.banner-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.banner-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.35), rgba(0,0,0,.05) 55%, transparent);
}
.banner-content {
  position: relative;
  z-index: 1;
  width: var(--site-width);
  max-width: 100%;
  padding: 0 24px;
  color: #fff;
}
.banner-content.center {
  text-align: center;
  margin: 0 auto;
}
.banner-content h2 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,.25);
  letter-spacing: 2px;
}
.banner-content.dark h2 { color: var(--major); text-shadow: none; }
.banner-content.dark p { color: #222; }
.banner-content p {
  font-size: 16px;
  margin-bottom: 22px;
  letter-spacing: 2px;
  opacity: .95;
}
.btn-more {
  display: inline-block;
  background: var(--major);
  color: #fff !important;
  padding: 10px 28px;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: background .2s;
}
.btn-more:hover { background: var(--major-dark); }
.banner-dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}
.banner-dots span {
  width: 28px;
  height: 3px;
  background: rgba(255,255,255,.45);
  cursor: pointer;
}
.banner-dots span.active { background: #fff; width: 40px; }

/* Home content */
.home-main { background: #fff; }
.section {
  padding: 36px 0;
}
.section.gray { background: var(--bg); }

.home-news-panel {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  padding: 28px 0 10px;
}
.news-scroll-box {
  border: 1px solid #eee;
  height: 360px;
  overflow: hidden;
  position: relative;
  background: #fff;
}
.news-scroll-inner {
  animation: newsScroll 40s linear infinite;
}
.news-scroll-box:hover .news-scroll-inner { animation-play-state: paused; }
@keyframes newsScroll {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}
.news-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px dashed #ddd;
  font-size: 14px;
}
.news-row a {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #333;
}
.news-row a:hover { color: var(--major); }
.news-row .date {
  color: #999;
  flex-shrink: 0;
  width: 96px;
  text-align: right;
}
.search-box {
  display: flex;
  margin-bottom: 14px;
  border: 1px solid #ddd;
  overflow: hidden;
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 12px;
}
.search-box button {
  border: none;
  background: var(--major);
  color: #fff;
  padding: 0 18px;
  cursor: pointer;
}

.panel {
  background: #fff;
}
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid var(--major);
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.panel-head h3 {
  font-size: 20px;
  color: #222;
  font-weight: 700;
}
.panel-head .en {
  color: var(--major);
  font-size: 13px;
  margin-left: 10px;
  font-weight: 400;
}
.panel-head .more {
  color: #999;
  font-size: 13px;
}
.panel-head .more:hover { color: var(--major); }

.list-plain .item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed #e0e0e0;
}
.list-plain .item a {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-plain .item .date {
  color: #999;
  width: 96px;
  text-align: right;
  flex-shrink: 0;
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
}
.section-title h2 {
  font-size: 24px;
  font-weight: 700;
  color: #222;
}
.section-title .en {
  color: var(--major);
  font-size: 14px;
}

.agency-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.agency-card {
  background: #fff;
  text-align: center;
  padding: 20px 16px 24px;
  transition: box-shadow .2s;
}
.agency-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.agency-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  margin-bottom: 14px;
  background: #eee;
}
.agency-card h4 {
  font-size: 16px;
  margin-bottom: 8px;
  font-weight: 600;
}
.agency-card p {
  color: var(--muted);
  font-size: 13px;
}

.intro-materials {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 36px;
  align-items: start;
}
.intro-box p {
  color: #555;
  line-height: 1.9;
  margin-bottom: 18px;
}
.intro-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.intro-actions a {
  display: inline-block;
  border: 1px solid var(--major);
  color: var(--major);
  padding: 8px 18px;
  font-size: 13px;
}
.intro-actions a:hover {
  background: var(--major);
  color: #fff;
}
.material-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.material-card {
  text-align: center;
  background: #fff;
  padding: 10px;
}
.material-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  background: #eee;
  margin-bottom: 8px;
}
.material-card span {
  font-size: 13px;
  color: #444;
}

/* Page layout */
.page-banner {
  height: 160px;
  background: linear-gradient(120deg, #163d88, #1e50ae 50%, #3a6fd8);
  display: flex;
  align-items: center;
  color: #fff;
}
.page-banner h1 {
  font-size: 32px;
  font-weight: 700;
}
.page-banner p {
  opacity: .85;
  margin-top: 6px;
}
.breadcrumb {
  padding: 14px 0;
  color: #888;
  font-size: 13px;
  border-bottom: 1px solid #eee;
}
.breadcrumb a { color: #666; }
.page-body {
  padding: 28px 0 48px;
  min-height: 420px;
}
.detail-article h1 {
  font-size: 24px;
  line-height: 1.4;
  margin-bottom: 12px;
}
.detail-meta {
  color: #999;
  font-size: 13px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
}
.detail-content {
  line-height: 1.9;
  color: #444;
  font-size: 15px;
  word-break: break-word;
}
.detail-content p { margin-bottom: 12px; }
.detail-content h1,
.detail-content h2,
.detail-content h3,
.detail-content h4,
.detail-content h5,
.detail-content h6 { margin: 16px 0 10px; line-height: 1.4; color: #222; }
.detail-content ul,
.detail-content ol { padding-left: 1.6em; margin: 10px 0; }
.detail-content li { margin: 4px 0; }
.detail-content blockquote {
  margin: 12px 0;
  padding: 8px 14px;
  border-left: 4px solid #1e50ae;
  background: #f5f8ff;
  color: #555;
}
.detail-content img,
.detail-content video {
  max-width: 100%;
  height: auto;
  margin: 12px 0;
  display: block;
}
.detail-content img {
  border-radius: 2px;
}
.detail-content a img {
  display: inline-block;
  vertical-align: middle;
}
.detail-content a { color: #1e50ae; text-decoration: underline; }
.detail-content hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 18px 0;
}
.detail-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  table-layout: fixed;
}
.detail-content th,
.detail-content td {
  border: 1px solid #ddd;
  padding: 8px 10px;
  text-align: left;
  word-break: break-word;
}
.detail-content th { background: #f5f7fa; font-weight: 600; }
.detail-content pre {
  background: #f6f8fa;
  padding: 12px;
  overflow: auto;
  border-radius: 4px;
  font-family: Consolas, monospace;
  font-size: 13px;
}
.detail-content .table-container {
  overflow-x: auto;
  margin: 14px 0;
}

.form-card {
  max-width: 640px;
  background: #fff;
  border: 1px solid #eee;
  padding: 28px;
}
.form-row {
  margin-bottom: 16px;
}
.form-row label {
  display: block;
  margin-bottom: 6px;
  color: #444;
}
.form-row input,
.form-row textarea {
  width: 100%;
  border: 1px solid #ddd;
  padding: 10px 12px;
  outline: none;
}
.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--major);
}
.form-row textarea { min-height: 120px; resize: vertical; }
.btn-primary {
  background: var(--major);
  color: #fff;
  border: none;
  padding: 10px 28px;
  cursor: pointer;
}
.btn-primary:hover { background: var(--major-dark); }
.btn-danger {
  background: #c0392b;
  color: #fff;
  border: none;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
}
.alert {
  padding: 10px 14px;
  margin-bottom: 14px;
  background: #eef5ff;
  color: var(--major);
  border: 1px solid #cfe0ff;
  display: none;
}
.alert.show { display: block; }
.alert.error { background: #fff1f0; color: #c0392b; border-color: #ffccc7; }

.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 28px;
}
.pagination button {
  border: 1px solid #ddd;
  background: #fff;
  padding: 6px 12px;
  cursor: pointer;
}
.pagination button.active,
.pagination button:hover:not(:disabled) {
  background: var(--major);
  color: #fff;
  border-color: var(--major);
}
.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pager-info {
  color: #666;
  font-size: 13px;
  align-self: center;
}

/* Footer */
.site-footer {
  background: #2b2b2b;
  color: #bbb;
  padding: 36px 0 18px;
  margin-top: 20px;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 28px;
}
.footer-cols h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 14px;
  font-weight: 600;
}
.footer-cols a {
  display: block;
  color: #aaa;
  font-size: 13px;
  margin-bottom: 8px;
}
.footer-cols a:hover { color: #fff; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 16px 0;
  border-top: 1px solid #444;
  border-bottom: 1px solid #444;
  margin-bottom: 14px;
  font-size: 13px;
}
.footer-links a { color: #aaa; }
.footer-links a:hover { color: #fff; }
.footer-copy {
  text-align: center;
  font-size: 12px;
  color: #888;
  line-height: 1.8;
}
.footer-copy a { color: #888; }
.footer-copy a:hover { color: #fff; }

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  background: var(--major) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 5l7 8h-4v6h-6v-6H5l7-8z'/%3E%3C/svg%3E") center/22px no-repeat;
  border: none;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 50;
}
.back-top.show { opacity: 1; pointer-events: auto; }

/* Admin */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}
.admin-side {
  background: #1a2a4a;
  color: #fff;
  padding: 20px 0;
}
.admin-side h2 {
  font-size: 16px;
  padding: 0 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 12px;
}
.admin-side a {
  display: block;
  color: #c8d4ea;
  padding: 12px 20px;
}
.admin-side a:hover,
.admin-side a.active {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.admin-main { padding: 24px; background: #f3f5f8; }
.admin-main h1 { font-size: 22px; margin-bottom: 18px; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.admin-table th,
.admin-table td {
  border: 1px solid #eee;
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
}
.admin-table th { background: #f8f9fb; }
.admin-table th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.admin-table th.sortable:hover { color: var(--major); }
.admin-table th.sortable .sort-mark { color: #bbb; font-size: 12px; margin-left: 4px; }
.admin-table th.sortable.asc .sort-mark,
.admin-table th.sortable.desc .sort-mark { color: var(--major); }
.admin-table .title-cell { max-width: 360px; }
.admin-table .ops { white-space: nowrap; }
.toolbar { margin-bottom: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-ghost {
  background: #fff;
  border: 1px solid #ccc;
  color: #333;
  padding: 10px 20px;
  cursor: pointer;
}
.btn-link {
  background: none;
  border: none;
  color: var(--major);
  cursor: pointer;
  padding: 0 6px;
  font-size: 13px;
}
.btn-link:disabled { color: #bbb; cursor: default; }
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 12px;
  background: #eef3fb;
  color: var(--major);
}
.tag-bid { background: #e8f1ff; color: #1e50ae; }
.tag-award { background: #eaf8ef; color: #1e7a3a; }
.tag-change { background: #fff7e6; color: #b8860b; }
.tag-terminate { background: #fff1f0; color: #c0392b; }
.status-pub { color: #1e7a3a; }
.status-draft { color: #b8860b; }

/* Rich text editor modal */
.editor-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow: auto;
}
.editor-modal[hidden] { display: none !important; }
.editor-dialog {
  width: min(1080px, 100%);
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0,0,0,.2);
}
.editor-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}
.editor-dialog-head h2 { font-size: 18px; margin: 0; }
.editor-close {
  border: none;
  background: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #888;
}
.editor-form { padding: 20px; }
.editor-title-row {
  margin-bottom: 14px;
}
.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 8px;
}
.editor-grid .form-row select,
.editor-form .form-row select {
  width: 100%;
  height: 38px;
  border: 1px solid #ddd;
  padding: 0 10px;
  font-size: 14px;
  background: #fff;
}
.editor-grid .form-row select:focus,
.editor-form .form-row select:focus {
  outline: none;
  border-color: #1e50ae;
}
.editor-hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: #888;
  line-height: 1.5;
}
.wang-wrap {
  border: 1px solid #ddd;
  border-radius: 2px;
  overflow: visible;
  background: #fff;
  position: relative;
}
.wang-toolbar {
  border-bottom: 1px solid #eee !important;
  background: #fafbfd;
}
.wang-editor {
  min-height: 380px;
  height: 420px;
  overflow-y: auto;
}
.wang-editor .w-e-text-container {
  min-height: 380px !important;
}
.wang-editor .w-e-scroll {
  min-height: 360px;
}
.wang-editor table {
  border-collapse: collapse;
  width: 100%;
  margin: 8px 0;
  table-layout: fixed;
}
.wang-editor th,
.wang-editor td {
  border: 1px solid #ccc;
  padding: 6px 8px;
  min-width: 50px;
  word-break: break-word;
}
.wang-editor th {
  background: #f5f7fa;
  font-weight: 600;
}
.wang-editor img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}
.wang-editor video {
  max-width: 100%;
  height: auto;
}
/* 选中图片：露出四角拖拽点，便于缩放 */
.wang-editor .w-e-image-container {
  max-width: 100%;
}
.wang-editor .w-e-selected-image-container {
  overflow: visible !important;
  outline: 1px solid #4290f7;
}
.wang-editor .w-e-selected-image-container .w-e-image-dragger {
  width: 10px !important;
  height: 10px !important;
  z-index: 20;
  border: 1px solid #fff;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}
.wang-editor .w-e-selected-image-container .left-top {
  left: -5px !important;
  top: -5px !important;
}
.wang-editor .w-e-selected-image-container .right-top {
  right: -5px !important;
  top: -5px !important;
}
.wang-editor .w-e-selected-image-container .left-bottom {
  left: -5px !important;
  bottom: -5px !important;
}
.wang-editor .w-e-selected-image-container .right-bottom {
  right: -5px !important;
  bottom: -5px !important;
}
/* 表格悬浮操作条不被裁剪 */
.w-e-bar-show,
.w-e-hover-bar,
.w-e-drop-panel,
.w-e-modal {
  z-index: 300 !important;
}
.detail-content table[style*="width"],
.detail-content .table-container table {
  max-width: 100%;
}
.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.notice-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.notice-tabs button {
  border: 1px solid #d0d7e5;
  background: #fff;
  color: #444;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
}
.notice-tabs button.active,
.notice-tabs button:hover {
  background: var(--major);
  border-color: var(--major);
  color: #fff;
}

/* Front notice type badge */
.notice-type-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 6px;
  font-size: 12px;
  color: var(--major);
  border: 1px solid #c5d4ef;
  background: #f3f7ff;
  vertical-align: middle;
}
.list-plain .item a .notice-type-badge { flex-shrink: 0; }

@media (max-width: 640px) {
  .editor-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .home-news-panel,
  .intro-materials,
  .agency-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .banner { height: 300px; }
  .banner-content h2 { font-size: 28px; }
  .brand-title { font-size: 20px; }
  .material-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .footer-cols { grid-template-columns: 1fr; }
  .brand-bar { height: 64px; }
  .brand-title { font-size: 18px; }
  .admin-layout { grid-template-columns: 1fr; }
}
