/* 基础重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
  color: #333;
  background-color: #f0f2f5;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ========== 入口页 ========== */
.page-entry {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.entry-header {
  text-align: center;
  margin-bottom: 48px;
}

.entry-header h1 {
  font-size: 30px;
  font-weight: 700;
  color: #1a4f8b;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.entry-header p {
  font-size: 14px;
  color: #888;
  letter-spacing: 1px;
}

.entry-btns {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.entry-btn {
  width: 220px;
  padding: 32px 20px;
  background-color: #fff;
  border: 1px solid #d5dae2;
  border-top: 3px solid #1a4f8b;
  text-align: center;
  transition: all 0.2s;
}

.entry-btn:hover {
  background-color: #f7f9fc;
  border-color: #1a4f8b;
  box-shadow: 0 2px 8px rgba(26, 79, 139, 0.15);
}

.entry-btn-title {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #1a4f8b;
  margin-bottom: 10px;
}

.entry-btn-desc {
  display: block;
  font-size: 13px;
  color: #8a94a6;
}

/* ========== 通用页面框架 ========== */
.page-header {
  height: 56px;
  background-color: #1a4f8b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px;
}
.crumbs {
  margin-bottom: 20px;
}
.page-header .header-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.page-header .header-nav {
  display: flex;
  gap: 20px;
}

.page-header .header-nav a {
  font-size: 14px;
  color: #cfe0f0;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.page-header .header-nav a:hover,
.page-header .header-nav a.active {
  color: #fff;
  border-bottom-color: #fff;
}

.page-body {
  padding: 20px;
}

.page-content {
  max-width: 1000px;
  margin: 0 auto;
  background-color: #fff;
  border: 1px solid #d5dae2;
  padding: 20px;
}

/* 写信须知 */
.notice-box {
  margin-bottom: 20px;
  padding: 16px 20px;
  border: 1px solid #e8c97a;
  background-color: #fffaf0;
  color: #5a4a2a;
  font-size: 13px;
  line-height: 1.8;
}

.notice-title {
  font-size: 14px;
  font-weight: 700;
  color: #8b5e00;
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 3px solid #e0a020;
}

.notice-content p {
  margin: 0 0 8px;
}

.notice-list {
  padding-left: 22px;
  margin: 0 0 8px;
}

.notice-list li {
  margin-bottom: 4px;
}

.notice-warn {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e8c97a;
  color: #d80909;
}

/* 面板标题 */
.panel-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a4f8b;
  padding-left: 10px;
  border-left: 3px solid #1a4f8b;
  margin-bottom: 20px;
}

/* 列表页工具栏 */
.page-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background-color: #fff;
  border: 1px solid #e8ecf1;
}

/* =============================================================================
 *  统计概览（仪表盘风格）
 *  左侧：政务蓝渐变主卡 + 装饰数据条
 *  右侧：6 张带语义色图标圆的小卡，两行 3 列 grid
 * ========================================================================== */
.stat-panel {
  margin-bottom: 16px;
  padding: 16px;
  display: flex;
  gap: 16px;
  background-color: #fff;
  border: 1px solid #e8ecf1;
  border-top: 3px solid #1a4f8b;
}

/* ---------- 左侧主卡 ---------- */
.stat-hero {
  position: relative;
  flex: 0 0 28%;
  min-width: 220px;
  padding: 22px 20px;
  background: linear-gradient(135deg, #1a4f8b 0%, #2d6bb0 100%);
  color: #fff;
  overflow: hidden;
  box-sizing: border-box;
}

.stat-hero-inner {
  position: relative;
  z-index: 1;
}

.stat-hero-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 1px;
}

.stat-hero-value {
  font-size: 44px;
  font-weight: 700;
  line-height: 1.15;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
}

.stat-hero-foot {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}
.stat-hero-foot b {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}

/* 右下装饰图形 */
.stat-hero-deco {
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 90px;
  height: 70px;
  opacity: 0.55;
  z-index: 0;
}

/* ---------- 右侧小卡网格 ---------- */
.stat-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-content: stretch;
}

.stat-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  background-color: #fff;
  border: 1px solid #e8ecf1;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.18s;
}

.stat-mini:hover {
  border-color: #1a4f8b;
  box-shadow: 0 2px 8px rgba(26, 79, 139, 0.12);
  transform: translateY(-1px);
}

.stat-mini-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-mini-icon svg {
  width: 18px;
  height: 18px;
  color: inherit;
}

/* 图标语义色（背景淡色 + 同色描边） */
.icon-blue   { background: #e8f0fb; color: #1a4f8b; }
.icon-green  { background: #e6f4ec; color: #1f7a4a; }
.icon-orange { background: #fdf1e0; color: #c97b1a; }
.icon-cyan   { background: #e3f4f6; color: #2a8ea1; }

.stat-mini-body {
  flex: 1;
  min-width: 0;
}

.stat-mini-value {
  font-size: 22px;
  font-weight: 700;
  color: #1a4f8b;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat-mini-label {
  font-size: 12px;
  color: #8a94a6;
  margin-top: 2px;
}

/* 搜索栏 */
.search-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8ecf1;
  margin-bottom: 20px;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-item label {
  width: 80px;
  text-align: right;
  color: #666;
  flex-shrink: 0;
}

.input-text {
  flex: 1;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #d5dae2;
  background-color: #fff;
  font-size: 14px;
  color: #333;
  outline: none;
}

.input-text:focus {
  border-color: #1a4f8b;
}

/* 只读展示（个人信息） */
.input-readonly {
  background-color: #f4f7fa;
  color: #555;
  cursor: default;
}

.input-readonly:focus {
  border-color: #d5dae2;
}

/* =============================================================================
 *  轻提示（政务蓝底版）
 *  三种类型统一蓝色系背景，用图标与饱和度区分语义
 * ========================================================================== */
#toast-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 16px;
  pointer-events: none;
}

.toast {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 380px;
  max-width: 560px;
  padding: 20px 26px;
  border: none;
  font-size: 17px;
  line-height: 1.5;
  font-weight: 500;
  box-sizing: border-box;
  box-shadow: 0 8px 28px rgba(26, 79, 139, 0.35), 0 2px 6px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: scale(0.9) translateY(16px);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #fff;
}

/* 顶部高光条，和背景同色但稍浅，制造层次感 */
.toast-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
}

/* 图标圆形包络 */
.toast-icon-wrap {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: inherit;
}

.toast-icon {
  width: 24px;
  height: 24px;
  color: inherit;
}

.toast-label {
  flex: 1;
  color: #fff;
  text-align: left;
  letter-spacing: 0.3px;
}

/* 进出动画 */
.toast-in {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.toast-out {
  opacity: 0;
  transform: scale(0.95) translateY(-10px);
}

/* ---------- 三种类型：统一政务蓝底，用图标颜色区分语义 ---------- */

/* 信息：政务蓝主色 */
.toast-info {
  background: #1a4f8b;
}
.toast-info .toast-icon-wrap { color: #1a4f8b; }

/* 成功：政务蓝底，绿色对勾图标 */
.toast-success {
  background: #1a4f8b;
}
.toast-success .toast-icon-wrap { color: #2e8b57; }

/* 错误：政务蓝底，红色叉号图标 */
.toast-error {
  background: #1a4f8b;
}
.toast-error .toast-icon-wrap { color: #c44536; }

/* 按钮 */
.btn {
  display: inline-block;
  padding: 0 18px;
  height: 32px;
  line-height: 30px;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  background-color: #fff;
}

.btn-primary {
  background-color: #1a4f8b;
  border-color: #1a4f8b;
  color: #fff;
}

.btn-primary:hover {
  background-color: #163f6e;
}

.btn-default {
  background-color: #fff;
  border-color: #d5dae2;
  color: #555;
}

.btn-default:hover {
  border-color: #1a4f8b;
  color: #1a4f8b;
}

/* 表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e8ecf1;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border: 1px solid #e8ecf1;
  font-size: 13px;
  text-align: left;
}

.data-table th {
  background-color: #f4f7fa;
  color: #1a4f8b;
  font-weight: 700;
  white-space: nowrap;
}

.data-table tbody tr:hover {
  background-color: #f7f9fc;
}

/* 固定列宽表格：单元格内容单行显示，超出省略 */
.data-table.table-fixed {
  table-layout: fixed;
}

.data-table.table-fixed td {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 表单 */
.form-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
}

.form-label {
  width: 110px;
  text-align: right;
  padding-right: 12px;
  line-height: 32px;
  flex-shrink: 0;
  color: #555;
}

.form-label .required {
  color: #d9342b;
  margin-right: 3px;
}

.form-field {
  flex: 1;
  max-width: 520px;
}

.form-field textarea {
  width: 100%;
  min-height: 120px;
  padding: 8px 10px;
  border: 1px solid #d5dae2;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  outline: none;
}

.form-field textarea:focus {
  border-color: #1a4f8b;
}

/* 表单分组面板 */
.form-panel {
  padding: 20px 20px 4px;
  margin-bottom: 24px;
  border: 1px solid #e8ecf1;
  background-color: #fff;
}

/* 下拉选择 */
.form-select {
  width: 100%;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #d5dae2;
  background-color: #fff;
  font-size: 14px;
  color: #333;
  outline: none;
  cursor: pointer;
}

.form-select:focus {
  border-color: #1a4f8b;
}

/* 单选组 */
.radio-group {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 32px;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

.radio-item input[type="radio"] {
  width: 14px;
  height: 14px;
  accent-color: #1a4f8b;
  cursor: pointer;
}

/* 附件上传 */
.upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 32px;
  flex-wrap: wrap;
}

.upload-btn {
  position: relative;
  overflow: hidden;
  line-height: 30px;
}

.upload-btn input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-list {
  margin-top: 8px;
}

.file-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 10px;
  margin-bottom: 6px;
  border: 1px solid #e8ecf1;
  background-color: #fbfcfd;
  font-size: 13px;
  color: #555;
}

.file-list .file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-list .file-size {
  color: #999;
  flex-shrink: 0;
}

.file-list .file-remove {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background-color: transparent;
  color: #c00;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
}

.file-list .file-remove:hover {
  background-color: #ffe9e9;
}

/* 表单提示文字 */
.form-tip {
  margin-top: 6px;
  font-size: 12px;
  color: #8a94a6;
}

/* 事发地树形联动选择 */
.area-selects {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 32px;
}

.area-select {
  width: auto;
  min-width: 160px;
  max-width: 220px;
}

.area-loading,
.area-error {
  font-size: 13px;
  color: #8a94a6;
}

.area-error {
  color: #d9342b;
}

.form-field .form-tip {
  margin-top: 4px;
}

/* 加宽的输入框（如信件标题） */
.form-field-wide {
  max-width: 100%;
}

.title-input {
  width: 100%;
  height: 40px;
  font-size: 15px;
}

.form-row-title .form-label {
  line-height: 40px;
}

.form-actions {
  padding-left: 110px;
  display: flex;
  gap: 12px;
}

/* 分页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e8ecf1;
  font-size: 13px;
  color: #666;
}

.pagination-info span {
  color: #1a4f8b;
  font-weight: 700;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-size {
  height: 28px;
  border: 1px solid #d5dae2;
  background-color: #fff;
  font-size: 13px;
  color: #333;
  outline: none;
}

.page-btn {
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #d5dae2;
  background-color: #fff;
  color: #555;
  font-size: 13px;
  cursor: pointer;
}

.page-btn:hover:not(:disabled):not(.active) {
  border-color: #1a4f8b;
  color: #1a4f8b;
}

.page-btn.active {
  background-color: #1a4f8b;
  border-color: #1a4f8b;
  color: #fff;
}

.page-btn:disabled {
  color: #bbb;
  background-color: #f7f8fa;
  cursor: not-allowed;
}

.page-jump-input {
  width: 48px;
  height: 28px;
  padding: 0 4px;
  border: 1px solid #d5dae2;
  text-align: center;
  font-size: 13px;
  outline: none;
}

.page-jump-input:focus {
  border-color: #1a4f8b;
}

/* 详情页 */
.detail-table th {
  width: 130px;
  background-color: #f4f7fa;
  color: #1a4f8b;
}

.detail-content {
  min-height: 120px;
  padding: 14px 16px;
  border: 1px solid #e8ecf1;
  background-color: #fbfcfd;
  font-size: 14px;
  line-height: 1.9;
  color: #333;
}

.detail-panel {
  border: 1px solid #e8ecf1;
  background-color: #fbfcfd;
  padding: 14px 16px;
}

.detail-row {
  padding: 6px 0;
  border-bottom: 1px dashed #e8ecf1;
  font-size: 14px;
  line-height: 1.9;
  color: #333;
}

.detail-row:last-child,
.detail-row.last {
  border-bottom: none;
}

.detail-label {
  display: inline-block;
  width: 88px;
  color: #666;
  font-weight: 500;
}

/* 回复内容 */
.reply-panel {
  margin-top: 12px;
  border-left: 3px solid #2a62c4;
  background-color: #f2f6fc;
  padding: 14px 18px;
}

.reply-label {
  font-size: 14px;
  font-weight: 600;
  color: #2a62c4;
  margin-bottom: 8px;
}

.reply-content {
  min-height: 80px;
  font-size: 14px;
  line-height: 2;
  color: #333;
  white-space: pre-wrap;
  word-break: break-all;
}

/* =============================================================================
 *  信件详情页（cm_ 前缀，独立命名空间，不影响其他页面）
 * ========================================================================== */
.cm-body {
  background-color: #f4f6f9;
}

/* 每个区块 */
.cm-section {
  background: #fff;
  border: 1px solid #e2e7ef;
  border-top: none;
  margin-bottom: 18px;
}

.cm-section-title {
  background: linear-gradient(to right, #2a62c4 0%, #4a84e0 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  letter-spacing: 1px;
}

.cm-title-bar {
  display: inline-block;
  width: 4px;
  height: 16px;
  background-color: rgba(255, 255, 255, 0.9);
  margin-right: 10px;
  border-radius: 2px;
}

/* 信息表格 */
.cm-info-table {
  width: 100%;
  border-collapse: collapse;
}

.cm-info-table th,
.cm-info-table td {
  border: 1px solid #e2e7ef;
  padding: 11px 16px;
  font-size: 14px;
  line-height: 1.8;
  vertical-align: middle;
}

.cm-info-table th {
  width: 120px;
  background-color: #f4f6f9;
  color: #5a6b82;
  font-weight: 600;
  text-align: left;
}

.cm-info-table td {
  color: #2b3440;
  background-color: #fff;
}

/* 状态标签 */
.cm-status-tag {
  display: inline-block;
  padding: 2px 12px;
  font-size: 13px;
  border-radius: 2px;
  background-color: #e8f0fb;
  color: #2a62c4;
  border: 1px solid #c0d3ef;
}

/* 附件列表 */
.cm-attach-list {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cm-attach-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border: 1px solid #e2e7ef;
  background-color: #fcfdff;
  color: #2b3440;
  font-size: 14px;
  text-decoration: none;
}

.cm-attach-item:hover {
  border-color: #2a62c4;
  background-color: #f4f8ff;
}

.cm-attach-name {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cm-attach-preview {
  flex-shrink: 0;
  color: #2a62c4;
  font-size: 13px;
}

/* 信件内容 */
.cm-content-box {
  padding: 20px 24px;
  font-size: 14px;
  line-height: 2;
  color: #2b3440;
  white-space: pre-wrap;
  word-break: break-all;
  background-color: #fcfdff;
  min-height: 120px;
}

/* 回复块（政务蓝，视觉层级） */
.cm-reply-box {
  background: linear-gradient(135deg, #f4f8ff 0%, #fff 100%);
  border-left: 4px solid #2a62c4;
  padding: 0;
}

.cm-reply-meta {
  display: flex;
  padding: 12px 20px;
  border-bottom: 1px dashed #c0d3ef;
  background-color: #eef4fc;
}

.cm-reply-item {
  display: flex;
  align-items: center;
  margin-right: 40px;
}

.cm-reply-label {
  font-size: 13px;
  color: #5a6b82;
  font-weight: 600;
  margin-right: 6px;
}

.cm-reply-value {
  font-size: 13px;
  color: #2a62c4;
}

.cm-reply-body {
  padding: 18px 24px;
}

.cm-reply-content {
  font-size: 14px;
  line-height: 2;
  color: #2b3440;
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 60px;
}

/* 底部按钮 */
.cm-footer {
  text-align: center;
  padding: 18px 0 10px;
}

.cm-footer .btn {
  min-width: 120px;
  margin: 0 8px;
}

/* 空状态 */
.empty-tip {
  text-align: center;
  color: #999;
  padding: 40px 0;
  font-size: 14px;
}
