/* =============================================================
   寿光市人民政府门户网站（静态演示样板）
   文件：assets/css/components.css
   职责：按钮、演示声明条、卡片、入口卡、标签/状态徽章、新闻与
         文件列表、分页、表格、表单、空状态、模态框、提示条、
         标签页、筛选条、情形导办、问答面板、搜索结果、文章详情、
         Toast、核对清单、月历、示意地图。
   依赖：tokens.css、base.css
   ============================================================= */

/* =============================================================
   1. 按钮
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--tap-min);
  padding: 0 var(--sp-5);
  border-radius: var(--radius-md);
  font-size: var(--fs-base);
  font-weight: 600;
  border: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
  text-align: center;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }

.btn--primary { background: var(--c-gov-blue); color: #fff; }
.btn--primary:hover { background: var(--c-gov-blue-light); color: #fff; }
.btn--primary:active { background: var(--c-gov-blue-deep); }

.btn--green { background: var(--c-sg-green); color: #fff; }
.btn--green:hover { background: var(--c-sg-green-dark); color: #fff; }

.btn--warm { background: var(--c-warm); color: #fff; }
.btn--warm:hover { background: var(--c-warm-dark); color: #fff; }

.btn--outline {
  background: #fff;
  color: var(--c-gov-blue);
  border-color: var(--c-gov-blue);
}
.btn--outline:hover { background: var(--c-gov-blue-pale); color: var(--c-gov-blue-dark); }

.btn--outline-green {
  background: #fff;
  color: var(--c-sg-green-dark);
  border-color: var(--c-sg-green);
}
.btn--outline-green:hover { background: var(--c-sg-green-pale); }

.btn--ghost {
  background: transparent;
  color: var(--c-text-secondary);
  border-color: var(--c-border);
}
.btn--ghost:hover { border-color: var(--c-gov-blue); color: var(--c-gov-blue); }

.btn--sm { min-height: 36px; padding: 0 var(--sp-4); font-size: var(--fs-sm); }
.btn--lg { min-height: 52px; padding: 0 var(--sp-8); font-size: var(--fs-md); }
.btn--block { width: 100%; }

.btn:disabled,
.btn[aria-disabled="true"] {
  background: var(--c-bg-soft);
  color: var(--c-text-muted);
  border-color: var(--c-border);
  cursor: not-allowed;
  box-shadow: none;
}
.btn:disabled:hover,
.btn[aria-disabled="true"]:hover {
  background: var(--c-bg-soft);
  color: var(--c-text-muted);
  transform: none;
}

/* =============================================================
   2. 演示声明条 / 演示徽章
   ============================================================= */
.demo-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  background: var(--c-warm-pale);
  border: 1px solid #EBD4AE;
  border-left: 4px solid var(--c-warm);
  border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-4);
  color: #6B4A10;
  font-size: var(--fs-sm);
  line-height: 1.7;
  margin-bottom: var(--sp-5);
}
.demo-banner strong { color: var(--c-warm-dark); }
.demo-banner svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 3px; }

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 600;
  background: var(--c-warm-pale);
  color: var(--c-warm-dark);
  border: 1px solid #EBD4AE;
  vertical-align: middle;
  white-space: nowrap;
}

/* =============================================================
   3. 卡片
   ============================================================= */
.card {
  background: var(--c-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-5);
  transition: box-shadow var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}
.card--hover:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--c-gov-blue-light);
  transform: translateY(-2px);
}
.card--topline { border-top: 3px solid var(--c-gov-blue); }
.card--topline-green { border-top: 3px solid var(--c-sg-green); }
.card--topline-warm { border-top: 3px solid var(--c-warm); }
.card--soft {
  background: linear-gradient(170deg, #FFFFFF 0%, var(--c-gov-blue-mist) 100%);
}
.card--soft-green {
  background: linear-gradient(170deg, #FFFFFF 0%, var(--c-sg-green-pale) 100%);
}
.card__title {
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-2);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.card__desc {
  color: var(--c-text-secondary);
  font-size: var(--fs-base);
  margin-bottom: var(--sp-3);
}
a.card-link {
  display: block;
  color: inherit;
}
a.card-link:hover { text-decoration: none; color: inherit; }
a.card-link:hover .card__title { color: var(--c-gov-blue); }

/* 入口卡（图标 + 名称 + 说明） */
.entry-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  background: var(--c-bg);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  color: inherit;
  min-height: 92px;
  transition: box-shadow var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.entry-card:hover {
  text-decoration: none;
  color: inherit;
  border-color: var(--c-gov-blue-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.entry-card__body { min-width: 0; }
.entry-card__name {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 2px;
}
.entry-card:hover .entry-card__name { color: var(--c-gov-blue); }
.entry-card__desc {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  margin: 0;
  line-height: 1.55;
}

/* 双色图标容器 */
.icon-chip {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-gov-blue-pale);
  color: var(--c-gov-blue);
}
.icon-chip svg { width: 24px; height: 24px; }
.icon-chip--green { background: var(--c-sg-green-pale); color: var(--c-sg-green-dark); }
.icon-chip--warm { background: var(--c-warm-pale); color: var(--c-warm-dark); }
.icon-chip--sm { width: 32px; height: 32px; border-radius: var(--radius-sm); }
.icon-chip--sm svg { width: 18px; height: 18px; }

/* =============================================================
   4. 标签 / 状态徽章
   ============================================================= */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: var(--fs-sm);
  background: var(--c-bg-soft);
  color: var(--c-text-secondary);
  border: 1px solid var(--c-border-light);
  white-space: nowrap;
}
.tag--blue { background: var(--c-gov-blue-pale); color: var(--c-gov-blue-dark); border-color: #C7D8E8; }
.tag--green { background: var(--c-sg-green-pale); color: var(--c-sg-green-dark); border-color: #BFE4DF; }
.tag--warm { background: var(--c-warm-pale); color: var(--c-warm-dark); border-color: #EBD4AE; }

/* 政策效力状态 */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.status-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}
.status-badge--valid { background: var(--c-success-pale); color: var(--c-success); border-color: #BBDFC6; }
.status-badge--abolished { background: var(--c-danger-pale); color: var(--c-danger); border-color: #EFC3C6; }
.status-badge--expired { background: var(--c-bg-soft); color: var(--c-text-muted); border-color: var(--c-border); }
.status-badge--pending { background: var(--c-warm-pale); color: var(--c-warm-dark); border-color: #EBD4AE; }

/* =============================================================
   5. 新闻 / 文件列表
   ============================================================= */
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list > li { margin: 0; }
.doc-list__item {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-1);
  border-bottom: 1px dashed var(--c-border-light);
  color: inherit;
}
.doc-list__item:hover { text-decoration: none; background: var(--c-gov-blue-mist); }
.doc-list__item:hover .doc-list__title { color: var(--c-gov-blue); }
.doc-list__dot {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-gov-blue-light);
  align-self: center;
}
.doc-list__title {
  flex: 1;
  min-width: 0;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.doc-list__meta {
  flex: 0 0 auto;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  white-space: nowrap;
}
.doc-list--wrap .doc-list__title { white-space: normal; }

/* 带摘要的新闻条目 */
.news-item {
  display: block;
  padding: var(--sp-4) var(--sp-2);
  border-bottom: 1px solid var(--c-border-light);
  color: inherit;
}
.news-item:hover { text-decoration: none; color: inherit; background: var(--c-gov-blue-mist); }
.news-item__title {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: var(--sp-1);
}
.news-item:hover .news-item__title { color: var(--c-gov-blue); }
.news-item__summary {
  color: var(--c-text-secondary);
  font-size: var(--fs-base);
  margin-bottom: var(--sp-2);
}
.news-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

/* =============================================================
   6. 分页
   ============================================================= */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-6);
}
.pagination__btn {
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  padding: 0 var(--sp-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-text-secondary);
  font-size: var(--fs-base);
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}
.pagination__btn:hover {
  border-color: var(--c-gov-blue);
  color: var(--c-gov-blue);
}
.pagination__btn[aria-current="page"] {
  background: var(--c-gov-blue);
  border-color: var(--c-gov-blue);
  color: #fff;
  font-weight: 700;
}
.pagination__btn:disabled {
  background: var(--c-bg-soft);
  color: var(--c-text-muted);
  border-color: var(--c-border-light);
}
.pagination__info {
  width: 100%;
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  margin-top: var(--sp-2);
}

/* =============================================================
   7. 表格
   ============================================================= */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-md);
}
.table-wrap__hint {
  display: none;
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  padding: var(--sp-1) var(--sp-3);
  background: var(--c-bg-soft);
}
.data-table { width: 100%; min-width: 560px; }
.data-table th,
.data-table td {
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  border-bottom: 1px solid var(--c-border-light);
  vertical-align: top;
}
.data-table thead th {
  background: var(--c-gov-blue-mist);
  color: var(--c-gov-blue-dark);
  font-weight: 700;
  white-space: nowrap;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--c-gov-blue-mist); }

/* =============================================================
   8. 表单
   ============================================================= */
.form-field { margin-bottom: var(--sp-5); }
.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--sp-2);
}
.form-label .req { color: var(--c-danger); margin-left: 2px; }
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  min-width: 0;
  min-height: var(--tap-min);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}
.form-textarea { min-height: 120px; line-height: 1.7; }
.form-input:hover,
.form-select:hover,
.form-textarea:hover { border-color: var(--c-gov-blue-light); }
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--c-gov-blue);
  box-shadow: 0 0 0 3px var(--c-gov-blue-pale);
  outline: none;
}
.form-field.has-error .form-input,
.form-field.has-error .form-select,
.form-field.has-error .form-textarea {
  border-color: var(--c-danger);
  box-shadow: 0 0 0 3px var(--c-danger-pale);
}
.form-hint {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  margin-top: var(--sp-1);
}
.form-error {
  display: none;
  font-size: var(--fs-sm);
  color: var(--c-danger);
  font-weight: 600;
  margin-top: var(--sp-1);
}
.form-field.has-error .form-error { display: block; }

/* 单选/复选组 */
.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
}
.choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap-min);
  padding: 0 var(--sp-3);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  background: #fff;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
}
.choice:hover { border-color: var(--c-gov-blue-light); }
.choice input { width: 18px; height: 18px; accent-color: var(--c-gov-blue); }
.choice:has(input:checked) {
  border-color: var(--c-gov-blue);
  background: var(--c-gov-blue-pale);
  font-weight: 600;
}
.choice:has(input:focus-visible) {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

/* =============================================================
   9. 空状态
   ============================================================= */
.empty-state {
  text-align: center;
  padding: var(--sp-12) var(--sp-5);
  background: var(--c-bg);
  border: 1px dashed var(--c-border);
  border-radius: var(--radius-lg);
  color: var(--c-text-muted);
}
.empty-state__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--sp-4);
  border-radius: 50%;
  background: var(--c-bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-muted);
}
.empty-state__icon svg { width: 28px; height: 28px; }
.empty-state__title {
  font-size: var(--fs-lg);
  color: var(--c-text-secondary);
  margin-bottom: var(--sp-2);
}
.empty-state .btn { margin-top: var(--sp-4); }

/* =============================================================
   10. 模态框
   ============================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13, 38, 66, 0.55);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-5);
}
.modal-backdrop.is-open { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
}
.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--c-border-light);
}
.modal__title { margin: 0; font-size: var(--fs-lg); }
.modal__close {
  width: var(--tap-min);
  height: var(--tap-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--c-text-muted);
  font-size: 22px;
  line-height: 1;
}
.modal__close:hover { background: var(--c-bg-soft); color: var(--c-text); }
.modal__body {
  padding: var(--sp-5);
  overflow-y: auto;
}
.modal__foot {
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--c-border-light);
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-3);
}

/* =============================================================
   11. 提示条（notice）
   ============================================================= */
.notice {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  line-height: 1.7;
  border: 1px solid transparent;
  margin-bottom: var(--sp-4);
}
.notice svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 3px; }
.notice--info { background: var(--c-info-pale); border-color: #C7D8E8; color: var(--c-gov-blue-dark); }
.notice--success { background: var(--c-success-pale); border-color: #BBDFC6; color: var(--c-success); }
.notice--warn { background: var(--c-warm-pale); border-color: #EBD4AE; color: #6B4A10; }
.notice--danger { background: var(--c-danger-pale); border-color: #EFC3C6; color: var(--c-danger); }

/* =============================================================
   12. 标签页（tabs）
   ============================================================= */
.tabs { margin-bottom: var(--sp-5); }
.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  border-bottom: 2px solid var(--c-border-light);
  margin: 0;
  padding: 0;
  list-style: none;
}
.tab-btn {
  min-height: var(--tap-min);
  padding: var(--sp-2) var(--sp-5);
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--c-text-secondary);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}
.tab-btn:hover { color: var(--c-gov-blue); }
.tab-btn[aria-selected="true"] {
  color: var(--c-gov-blue);
  border-bottom-color: var(--c-gov-blue);
}
.tab-panel { padding: var(--sp-5) 0 0; }
.tab-panel[hidden] { display: none; }

/* =============================================================
   13. 筛选条
   ============================================================= */
.filter-bar {
  background: var(--c-bg);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-lg);
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-5);
}
.filter-group {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
}
.filter-group + .filter-group { border-top: 1px dashed var(--c-border-light); }
.filter-group__label {
  flex: 0 0 84px;
  font-weight: 700;
  color: var(--c-text-secondary);
  padding-top: 6px;
  font-size: var(--fs-base);
}
.filter-group__options {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.filter-chip {
  min-height: 36px;
  padding: 4px var(--sp-4);
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: #fff;
  color: var(--c-text-secondary);
  font-size: var(--fs-sm);
  transition: all var(--dur-fast) var(--ease);
}
.filter-chip:hover { border-color: var(--c-gov-blue); color: var(--c-gov-blue); }
.filter-chip[aria-pressed="true"] {
  background: var(--c-gov-blue);
  border-color: var(--c-gov-blue);
  color: #fff;
  font-weight: 600;
}
.filter-bar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--c-border-light);
}
.filter-bar__summary {
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
}
.filter-bar__summary strong { color: var(--c-gov-blue); }

/* =============================================================
   14. 情形导办
   ============================================================= */
.situation-guide {
  border: 1px solid var(--c-sg-green);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.situation-guide__head {
  background: var(--c-sg-green-pale);
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 700;
  color: var(--c-sg-green-dark);
}
.situation-guide__body { padding: var(--sp-5); background: #fff; }
.situation-step { margin-bottom: var(--sp-5); }
.situation-step__q {
  font-weight: 700;
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.situation-step__num {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--c-sg-green);
  color: #fff;
  font-size: var(--fs-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.situation-result {
  border-top: 1px dashed var(--c-border);
  padding-top: var(--sp-4);
}
.material-list { list-style: none; margin: 0 0 var(--sp-4); padding: 0; }
.material-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  padding: var(--sp-2) 0;
  border-bottom: 1px dashed var(--c-border-light);
}
.material-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 10px;
  border-radius: 2px;
  background: var(--c-sg-green);
}

/* =============================================================
   15. 菜小帮问答面板
   ============================================================= */
.chat-panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 400px;
  max-width: calc(100vw - 32px);
  max-height: min(640px, calc(100vh - 32px));
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--c-border-light);
  z-index: var(--z-modal);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.chat-panel.is-open { display: flex; }
.chat-panel__head {
  background: var(--c-gov-blue);
  color: #fff;
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.chat-panel__head img,
.chat-panel__head svg { width: 30px; height: 30px; flex: 0 0 auto; }
.chat-panel__title { flex: 1; min-width: 0; }
.chat-panel__title strong { display: block; font-size: var(--fs-base); }
.chat-panel__title span {
  display: block;
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.8);
}
.chat-panel__close {
  width: 40px;
  height: 40px;
  color: #fff;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}
.chat-panel__close:hover { background: rgba(255, 255, 255, 0.15); }
.chat-panel__close:focus-visible { outline-color: #fff; }
.chat-panel__disclaimer {
  background: var(--c-warm-pale);
  color: #6B4A10;
  font-size: var(--fs-xs);
  padding: var(--sp-2) var(--sp-4);
  line-height: 1.6;
  border-bottom: 1px solid #EBD4AE;
}
.chat-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-4);
  background: var(--c-bg-page);
  min-height: 200px;
}
.chat-msg { margin-bottom: var(--sp-4); display: flex; }
.chat-msg--user { justify-content: flex-end; }
.chat-msg__bubble {
  max-width: 86%;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-lg);
  font-size: var(--fs-sm);
  line-height: 1.7;
}
.chat-msg--bot .chat-msg__bubble {
  background: #fff;
  border: 1px solid var(--c-border-light);
  border-top-left-radius: var(--radius-sm);
}
.chat-msg--user .chat-msg__bubble {
  background: var(--c-gov-blue);
  color: #fff;
  border-top-right-radius: var(--radius-sm);
}
.chat-msg__source {
  margin-top: var(--sp-2);
  padding-top: var(--sp-2);
  border-top: 1px dashed var(--c-border-light);
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
}
.chat-msg__source a { font-weight: 600; }
.chat-msg__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}
.chat-msg__actions a {
  font-size: var(--fs-xs);
  padding: 4px 10px;
  border: 1px solid var(--c-gov-blue-light);
  border-radius: 999px;
  color: var(--c-gov-blue);
  min-height: 30px;
  display: inline-flex;
  align-items: center;
}
.chat-msg__actions a:hover { background: var(--c-gov-blue-pale); text-decoration: none; }
.chat-suggests {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-top: 1px solid var(--c-border-light);
  background: #fff;
}
.chat-suggests button {
  font-size: var(--fs-xs);
  padding: 5px 12px;
  min-height: 32px;
  background: var(--c-bg-soft);
  border: 1px solid var(--c-border-light);
  border-radius: 999px;
  color: var(--c-text-secondary);
}
.chat-suggests button:hover {
  background: var(--c-gov-blue-pale);
  color: var(--c-gov-blue);
  border-color: var(--c-gov-blue-light);
}
.chat-panel__input {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--c-border-light);
  background: #fff;
}
.chat-panel__input input {
  flex: 1;
  min-width: 0;
  min-height: var(--tap-min);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 0 var(--sp-3);
}
.chat-panel__input input:focus {
  border-color: var(--c-gov-blue);
  box-shadow: 0 0 0 3px var(--c-gov-blue-pale);
  outline: none;
}
.chat-panel__tools {
  display: flex;
  justify-content: space-between;
  padding: 0 var(--sp-4) var(--sp-3);
  background: #fff;
}
.chat-panel__tools button {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  min-height: 30px;
  padding: 0 var(--sp-2);
}
.chat-panel__tools button:hover { color: var(--c-gov-blue); text-decoration: underline; }

/* =============================================================
   16. 搜索结果 / 智能总结
   ============================================================= */
.result-item {
  display: block;
  padding: var(--sp-4) var(--sp-2);
  border-bottom: 1px solid var(--c-border-light);
  color: inherit;
}
.result-item:hover { text-decoration: none; color: inherit; background: var(--c-gov-blue-mist); }
.result-item__type { margin-right: var(--sp-2); }
.result-item__title {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--c-gov-blue);
  margin-bottom: var(--sp-1);
}
.result-item:hover .result-item__title { text-decoration: underline; }
.result-item__snippet {
  color: var(--c-text-secondary);
  font-size: var(--fs-base);
  margin-bottom: var(--sp-1);
}
.result-item__snippet mark {
  background: #FFE9A8;
  color: inherit;
  padding: 0 2px;
}
.result-item__meta {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

.ai-summary {
  border: 1px solid var(--c-gov-blue-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--sp-6);
  background: linear-gradient(170deg, #FFFFFF 0%, var(--c-gov-blue-mist) 100%);
}
.ai-summary__head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  background: var(--c-gov-blue-pale);
  color: var(--c-gov-blue-dark);
  font-weight: 700;
}
.ai-summary__head svg { width: 20px; height: 20px; }
.ai-summary__body { padding: var(--sp-5); }
.ai-summary__body ol { margin-bottom: var(--sp-3); }
.ai-summary__refs {
  border-top: 1px dashed var(--c-border);
  padding-top: var(--sp-3);
  font-size: var(--fs-sm);
}
.ai-summary__refs a { margin-right: var(--sp-3); }

/* =============================================================
   17. 文章详情
   ============================================================= */
.article {
  background: #fff;
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
}
.article__title {
  text-align: center;
  font-size: var(--fs-2xl);
  margin-bottom: var(--sp-4);
}
.article__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-2) var(--sp-5);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--c-border-light);
  margin-bottom: var(--sp-6);
}
.article__body {
  font-size: var(--fs-md);
  line-height: var(--lh-loose);
  color: var(--c-text);
}
.article__body p { margin-bottom: var(--sp-5); text-indent: 2em; }
.article__body h3 {
  font-size: var(--fs-lg);
  margin: var(--sp-6) 0 var(--sp-3);
  text-indent: 0;
}
.article__tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: flex-end;
  margin-bottom: var(--sp-5);
}
.article__attachments {
  margin-top: var(--sp-6);
  padding: var(--sp-4) var(--sp-5);
  background: var(--c-bg-soft);
  border-radius: var(--radius-md);
}
.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--sp-6);
  font-size: var(--fs-base);
}
.meta-grid > div {
  display: flex;
  border-bottom: 1px solid var(--c-border-light);
}
.meta-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
.meta-grid dt {
  flex: 0 0 112px;
  background: var(--c-gov-blue-mist);
  color: var(--c-text-secondary);
  font-weight: 600;
  padding: var(--sp-2) var(--sp-3);
  margin: 0;
}
.meta-grid dd {
  flex: 1;
  padding: var(--sp-2) var(--sp-3);
  margin: 0;
  min-width: 0;
  overflow-wrap: break-word;
}

/* =============================================================
   18. Toast（aria-live 轻提示）
   ============================================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%) translateY(10px);
  background: var(--c-gov-blue-deep);
  color: #fff;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm);
  z-index: calc(var(--z-modal) + 10);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-base) var(--ease),
              transform var(--dur-base) var(--ease),
              visibility var(--dur-base) var(--ease);
  max-width: calc(100vw - 40px);
}
.toast.is-show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* =============================================================
   19. 材料核对清单（商事预审）
   ============================================================= */
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { margin: 0; }
.check-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-3);
  background: #fff;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease);
}
.check-item:hover { border-color: var(--c-sg-green); }
.check-item input {
  width: 20px;
  height: 20px;
  margin-top: 4px;
  flex: 0 0 auto;
  accent-color: var(--c-sg-green);
}
.check-item:has(input:checked) {
  border-color: var(--c-sg-green);
  background: var(--c-sg-green-pale);
}
.check-item:has(input:focus-visible) {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}
.check-item__name { font-weight: 600; }
.check-item__hint {
  display: block;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  font-weight: 400;
  margin-top: 2px;
}

/* =============================================================
   20. 月历（城市日历）
   ============================================================= */
.calendar {
  background: #fff;
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.calendar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-gov-blue-mist);
  border-bottom: 1px solid var(--c-border-light);
}
.calendar__month {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--c-gov-blue-dark);
}
.calendar__nav {
  width: var(--tap-min);
  height: var(--tap-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: var(--fs-lg);
  color: var(--c-text-secondary);
}
.calendar__nav:hover { border-color: var(--c-gov-blue); color: var(--c-gov-blue); }
.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.calendar__weekday {
  text-align: center;
  padding: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--c-text-secondary);
  background: var(--c-bg-soft);
  border-bottom: 1px solid var(--c-border-light);
}
.calendar__cell {
  min-height: 64px;
  border-right: 1px solid var(--c-border-light);
  border-bottom: 1px solid var(--c-border-light);
  padding: var(--sp-1);
  text-align: left;
  position: relative;
  background: #fff;
  display: block;
  width: 100%;
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  transition: background var(--dur-fast) var(--ease);
}
.calendar__cell:nth-child(7n) { border-right: 0; }
.calendar__cell--empty { background: var(--c-bg-page); cursor: default; }
.calendar__cell--has-event { cursor: pointer; }
.calendar__cell--has-event:hover { background: var(--c-sg-green-pale); }
.calendar__cell--selected {
  background: var(--c-gov-blue-pale);
  box-shadow: inset 0 0 0 2px var(--c-gov-blue);
}
.calendar__cell--today .calendar__daynum {
  background: var(--c-gov-blue);
  color: #fff;
}
.calendar__daynum {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: 600;
}
.calendar__dots {
  display: flex;
  gap: 3px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.calendar__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-sg-green);
}
.calendar__dot--expo { background: var(--c-gov-blue); }
.calendar__dot--culture { background: var(--c-warm); }
.calendar__dot--job { background: #7C5CBF; }
.calendar__dot--public { background: var(--c-sg-green); }

/* =============================================================
   21. 便民示意地图
   ============================================================= */
.map-stage {
  background: #fff;
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}
.map-canvas {
  position: relative;
  width: 100%;
  padding-bottom: 68%;
  background:
    linear-gradient(0deg, rgba(13, 148, 136, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 148, 136, 0.045) 1px, transparent 1px),
    linear-gradient(160deg, #F4FAF8 0%, #EDF4F9 100%);
  background-size: 36px 36px, 36px 36px, 100% 100%;
}
.map-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  justify-content: flex-end;
  z-index: 2;
}
.map-pin__dot {
  width: 22px;
  height: 22px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--c-gov-blue);
  border: 2px solid #fff;
  box-shadow: var(--shadow-md);
  transition: transform var(--dur-fast) var(--ease);
}
.map-pin:hover .map-pin__dot,
.map-pin.is-active .map-pin__dot { transform: rotate(-45deg) scale(1.25); }
.map-pin.is-active .map-pin__dot { background: var(--c-warm); }
.map-pin--gov .map-pin__dot { background: var(--c-gov-blue); }
.map-pin--med .map-pin__dot { background: var(--c-danger); }
.map-pin--edu .map-pin__dot { background: #7C5CBF; }
.map-pin--eld .map-pin__dot { background: var(--c-warm); }
.map-pin--agri .map-pin__dot { background: var(--c-sg-green); }
.map-pin__label {
  font-size: var(--fs-xs);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  white-space: nowrap;
  color: var(--c-text-secondary);
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--c-border-light);
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  background: #fff;
}
.map-legend__dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: -1px;
  background: var(--c-gov-blue);
}
.map-legend__dot--gov  { background: var(--c-gov-blue); }
.map-legend__dot--med  { background: var(--c-danger); }
.map-legend__dot--edu  { background: #7C5CBF; }
.map-legend__dot--eld  { background: var(--c-warm); }
.map-legend__dot--agri { background: var(--c-sg-green); }
.place-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-md);
  background: #fff;
  margin-bottom: var(--sp-2);
  transition: border-color var(--dur-fast) var(--ease);
}
.place-item:hover { border-color: var(--c-gov-blue-light); }
.place-item.is-active {
  border-color: var(--c-gov-blue);
  background: var(--c-gov-blue-pale);
}
.place-item__name { font-weight: 700; margin-bottom: 2px; }
.place-item__meta { font-size: var(--fs-sm); color: var(--c-text-muted); }

/* =============================================================
   22. 数字看板（轻量数据展示）
   ============================================================= */
.stat-card {
  background: #fff;
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-lg);
  border-top: 3px solid var(--c-sg-green);
  padding: var(--sp-4) var(--sp-5);
}
.stat-card__value {
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--c-gov-blue-dark);
  line-height: 1.2;
}
.stat-card__value small { font-size: var(--fs-sm); font-weight: 400; color: var(--c-text-muted); margin-left: 2px; }
.stat-card__label {
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  margin-top: 2px;
}
.bar-chart { display: flex; flex-direction: column; gap: var(--sp-2); }
.bar-chart__row { display: flex; align-items: center; gap: var(--sp-3); }
.bar-chart__label {
  flex: 0 0 96px;
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  text-align: right;
}
.bar-chart__track {
  flex: 1;
  height: 18px;
  background: var(--c-bg-soft);
  border-radius: 999px;
  overflow: hidden;
}
.bar-chart__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--c-gov-blue-light), var(--c-sg-green));
}
.bar-chart__value {
  flex: 0 0 56px;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}
