/* ============================================================
   屯庄村/羊平镇 "有事找支部" 为民服务中心 - 主样式
   政务风格：红色主调 + 金色点缀
   ============================================================ */

/* CSS Variables */
:root {
  --gov-red: #c41e3a;
  --gov-dark-red: #8b1a2b;
  --gov-gold: #d4a853;
  --gov-light-gold: #f5e6c8;
  --bg-light: #f8f6f1;
  --bg-white: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #666;
  --text-muted: #999;
  --border-color: #e5ddd0;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --green: #16a34a;
  --red: #dc2626;
  --yellow: #d97706;
  --blue: #2563eb;
  --orange: #ea580c;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
  background: var(--bg-light);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

/* ============ 背景图片 ============ */
.bg-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  /* 请将您的背景照片命名为 background.jpg 放入 static/uploads/ 目录 */
  /* 如果没有照片，将显示默认的渐变色背景 */
  background:
    linear-gradient(135deg, rgba(196,30,58,0.06) 0%, rgba(139,26,43,0.04) 50%, rgba(196,30,58,0.06) 100%),
    url('/static/uploads/background.jpg') center/cover no-repeat;
  z-index: 0;
  pointer-events: none;
}

/* ============ 头部导航 ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, var(--gov-red), var(--gov-dark-red));
  color: #fff;
  box-shadow: 0 2px 16px rgba(196, 30, 58, 0.3);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-icon { font-size: 24px; }

.header-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.header-pending-badge {
  display: none;
  align-items: center;
  gap: 4px;
  background: #fbbf24;
  color: #78350f;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.header-pending-badge .pending-num {
  background: #78350f;
  color: #fbbf24;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  opacity: 0.95;
}

.town-header {
  background: linear-gradient(135deg, #1a3a5c, #0f2440);
  box-shadow: 0 2px 16px rgba(26, 58, 92, 0.3);
}

/* 角色标签 */
.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.role-badge.village_admin { background: rgba(255,255,255,0.25); }
.role-badge.town_admin { background: rgba(212,168,83,0.3); }
.role-badge.grid_worker { background: rgba(255,255,255,0.2); }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
  background: var(--gov-red);
  color: #fff;
}
.btn-primary:hover { background: var(--gov-dark-red); }

.btn-success {
  background: var(--green);
  color: #fff;
}
.btn-success:hover { background: #15803d; }

.btn-danger {
  background: var(--red);
  color: #fff;
}
.btn-danger:hover { background: #b91c1c; }

.btn-warning {
  background: var(--orange);
  color: #fff;
}
.btn-warning:hover { background: #c2410c; }

.btn-outline {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 13px;
}
.btn-outline:hover { background: rgba(255,255,255,0.25); }

.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-xs { padding: 3px 10px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }

/* ============ 主内容区 ============ */
.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.main-left, .main-right {
  min-width: 0;
}

/* ============ 标题区 ============ */
.hero-section {
  background: linear-gradient(135deg, var(--gov-red), var(--gov-dark-red));
  color: #fff;
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: rgba(212,168,83,0.15);
  border-radius: 50%;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -20px; left: -20px;
  width: 80px; height: 80px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.hero-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 3px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.hero-subtitle {
  font-size: 15px;
  opacity: 0.95;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-tagline {
  background: var(--gov-gold);
  color: var(--gov-dark-red);
  padding: 4px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 1px;
}

.hero-divider {
  font-size: 16px;
  opacity: 0.7;
}

.hero-links {
  display: flex;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.hero-link-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s;
}
.hero-link-card.green { background: rgba(22,163,74,0.8); }
.hero-link-card.green:hover { background: rgba(22,163,74,1); transform: translateY(-2px); }
.hero-link-card.orange { background: rgba(234,88,12,0.8); }
.hero-link-card.orange:hover { background: rgba(234,88,12,1); transform: translateY(-2px); }
.link-icon { font-size: 22px; }

/* 镇级标题区 */
.town-hero {
  background: linear-gradient(135deg, #1a3a5c, #0f2440);
}
.town-tagline {
  background: var(--gov-gold);
  color: #1a3a5c;
}

.pending-alert {
  background: rgba(255,255,255,0.15);
  padding: 12px 20px;
  border-radius: 8px;
  margin-top: 16px;
  font-size: 15px;
  position: relative;
  z-index: 1;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ============ 区块 ============ */
.section {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 24px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(to bottom, #fdfbf7, #faf7f0);
}

.section-header h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--gov-dark-red);
}

.appeal-count {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============ 新闻 ============ */
.news-list { padding: 8px 0; }

.news-item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: #fdfbf7; }

.news-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gov-dark-red);
  margin-bottom: 6px;
}

.news-content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.news-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ============ 诉求列表 ============ */
.appeals-list {
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  padding: 8px 0;
}

.appeal-card {
  margin: 8px 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background: #fff;
  transition: all 0.2s;
}

.appeal-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.appeal-card.citizen-0 {
  border-left: 4px solid var(--green);
}
.appeal-card.grid_worker-0 {
  border-left: 4px solid var(--yellow);
}
.appeal-card.grid_worker-1 {
  border-left: 4px solid var(--red);
}

.appeal-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.appeal-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}
.appeal-badge.citizen-0 { background: #dcfce7; color: var(--green); }
.appeal-badge.grid_worker-0 { background: #fef3c7; color: var(--yellow); }
.appeal-badge.grid_worker-1 { background: #fee2e2; color: var(--red); }

.appeal-status {
  font-size: 12px;
  color: var(--text-muted);
}

.appeal-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}

.appeal-submitter {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.appeal-content {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  word-break: break-all;
}

.appeal-result {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
}

.result-section {
  font-size: 13px;
  margin-bottom: 6px;
}

.result-label {
  font-weight: 600;
  color: var(--gov-dark-red);
}

.result-handler {
  font-size: 12px;
  color: var(--text-muted);
}

.result-photo { margin-top: 8px; }

.photo-thumb {
  max-width: 160px;
  max-height: 120px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid var(--border-color);
  transition: transform 0.2s;
}
.photo-thumb:hover { transform: scale(1.05); }

.town-result {
  background: #fffdf5;
  padding: 8px 12px;
  border-radius: 6px;
}

.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }

.process-btn {
  margin-top: 10px;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 18px;
  animation: processBtnPulse 1.5s ease-in-out infinite;
}

@keyframes processBtnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
}

.appeal-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

// 待处理诉求卡片高亮
.appeal-card[data-status="pending"] {
  border-left: 4px solid var(--green);
  background: linear-gradient(to right, rgba(22, 163, 74, 0.03), transparent 40%);
}

.appeal-card[data-status="town_rejected"] {
  border-left: 4px solid var(--red);
  background: linear-gradient(to right, rgba(220, 38, 38, 0.03), transparent 40%);
}

.process-hint {
  color: var(--text-secondary) !important;
  font-size: 12px;
}

.review-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* 筛选Tab */
.review-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 0 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 8px;
}

.tab-btn {
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.tab-btn:hover {
  border-color: var(--gov-red);
  color: var(--gov-red);
}

.tab-btn.active {
  background: var(--gov-red);
  color: #fff;
  border-color: var(--gov-red);
  font-weight: 600;
}

.process-appeal-preview {
  background: #fdfbf7;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 14px;
  border: 1px solid var(--border-color);
}

/* ============ 网格员管理 ============ */
.grid-worker-list { padding: 8px 0; }

.grid-worker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
  flex-wrap: wrap;
}
.grid-worker-item:last-child { border-bottom: none; }

.gw-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
}

.gw-username { color: var(--text-muted); font-size: 13px; font-family: monospace; }
.gw-village {
  background: #fdfbf7;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--gov-dark-red);
}
.gw-time { font-size: 12px; color: var(--text-muted); }

.gw-actions { display: flex; gap: 6px; }

/* ============ 弹窗/模态框 ============ */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-height: 85vh;
  overflow-y: auto;
  width: 90%;
  max-width: 600px;
  animation: slideUp 0.3s;
}

.modal-lg { max-width: 800px; }
.modal-sm { max-width: 420px; }

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(to bottom, #fdfbf7, #faf7f0);
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--gov-dark-red);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  line-height: 1;
}
.modal-close:hover { color: var(--text-primary); }

.modal-body {
  padding: 24px;
}

/* ============ 表单 ============ */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.required { color: var(--red); }

.input-field,
.modal textarea,
.modal input[type="text"],
.modal input[type="password"],
.modal input[type="tel"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
  background: #fdfbf7;
  color: var(--text-primary);
}

.input-field:focus,
.modal textarea:focus,
.modal input:focus {
  outline: none;
  border-color: var(--gov-red);
  box-shadow: 0 0 0 3px rgba(196,30,58,0.1);
}

.file-input {
  font-size: 14px;
  padding: 8px 0;
}

.photo-preview { margin-top: 10px; }

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.mb-20 { margin-bottom: 20px; }

/* ============ 管理列表项 ============ */
.manage-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  gap: 10px;
  flex-wrap: wrap;
}
.manage-item:last-child { border-bottom: none; }

.manage-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.manage-item-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.manage-item-status.published { background: #dcfce7; color: var(--green); }
.manage-item-status.draft { background: #fef3c7; color: var(--yellow); }

.manage-item-actions {
  display: flex;
  gap: 6px;
}

/* ============ 空状态 ============ */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ============ 全屏通知弹窗（实时轮询） ============ */
#notificationContainer {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fullscreen-notif {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: notifFadeIn 0.5s ease-out;
}

.fullscreen-notif::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}

.fullscreen-notif.fading {
  animation: notifFadeOut 0.4s ease-in forwards;
}

.fullscreen-notif-inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
  width: 90%;
  padding: 40px 36px;
  border-radius: 16px;
  text-align: center;
  animation: notifBounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

/* 绿色 - 百姓诉求 */
.fullscreen-notif.notif-citizen .fullscreen-notif-inner {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 3px solid #16a34a;
}
.fullscreen-notif.notif-citizen .fullscreen-notif-type {
  color: #16a34a;
  background: #dcfce7;
}

/* 红色 - 网格员上报镇 */
.fullscreen-notif.notif-grid-town .fullscreen-notif-inner {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 3px solid #dc2626;
}
.fullscreen-notif.notif-grid-town .fullscreen-notif-type {
  color: #dc2626;
  background: #fee2e2;
}

/* 黄色 - 网格员未报镇 */
.fullscreen-notif.notif-grid .fullscreen-notif-inner {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 3px solid #d97706;
}
.fullscreen-notif.notif-grid .fullscreen-notif-type {
  color: #d97706;
  background: #fef3c7;
}

.fullscreen-notif-type {
  display: inline-block;
  padding: 6px 24px;
  border-radius: 20px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.fullscreen-notif-name {
  font-size: 16px;
  color: #666;
  margin-bottom: 16px;
}

.fullscreen-notif-content {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.7;
  margin-bottom: 20px;
  padding: 20px;
  background: rgba(255,255,255,0.6);
  border-radius: 10px;
  word-break: break-all;
}

.fullscreen-notif-time {
  font-size: 13px;
  color: #999;
  margin-bottom: 16px;
}

.fullscreen-notif-hint {
  font-size: 13px;
  color: #999;
  animation: hintPulse 2s infinite;
}

@keyframes notifFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes notifFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes notifBounce {
  0% { transform: scale(0.7); opacity: 0; }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* 图片查看器 */
#photoViewer {
  background: rgba(0,0,0,0.85);
  cursor: pointer;
}
#photoViewer img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}
.photo-viewer-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
}

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .main-container {
    grid-template-columns: 1fr;
  }

  .main-right {
    order: -1;
  }

  .appeals-list {
    max-height: 500px;
  }

  .hero-title {
    font-size: 22px;
  }

  .header-title {
    font-size: 16px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 8px 12px;
  }

  .header-left { flex: 1; }
  .header-right { width: 100%; }

  .main-container {
    padding: 12px;
  }

  .hero-section {
    padding: 24px 18px;
  }

  .hero-title {
    font-size: 18px;
  }

  .hero-links {
    flex-direction: column;
  }

  .section-header {
    padding: 12px 16px;
  }

  .appeal-card {
    margin: 6px 8px;
    padding: 12px;
  }
}

/* ============ 登录页 ============ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-light) 0%, #f5ede0 100%);
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 400px;
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-emblem {
  font-size: 48px;
  margin-bottom: 8px;
}

.login-header h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--gov-red);
  letter-spacing: 3px;
}

.login-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gov-dark-red);
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

.login-card {
  background: #fff;
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.login-error {
  color: var(--red);
  font-size: 13px;
  min-height: 20px;
  margin-bottom: 8px;
}

.login-footer {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
}

.login-footer a {
  color: var(--gov-red);
  text-decoration: none;
}
.login-footer a:hover { text-decoration: underline; }

.login-footer-divider {
  color: var(--text-muted);
  margin: 0 8px;
}

.login-hint {
  margin-top: 20px;
  padding: 14px;
  background: #fffdf5;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.login-hint strong {
  color: var(--gov-dark-red);
}
/* ============ 村级审核：办结/未办结 单选 ============ */
.radio-group {
  display: flex;
  gap: 16px;
  margin-top: 6px;
  padding: 10px 14px;
  background: #fdfbf7;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 6px;
  transition: background 0.2s;
  user-select: none;
}

.radio-label:hover {
  background: #fef3c7;
}

.radio-label input[type="radio"] {
  accent-color: var(--gov-red);
  width: 16px;
  height: 16px;
}

/* 办结选中 */
.radio-label:has(input[value="completed"]:checked) {
  background: #dcfce7;
  border: 1px solid #16a34a;
  color: #16a34a;
  font-weight: 600;
}

/* 未办结选中 */
.radio-label:has(input[value="incomplete"]:checked) {
  background: #fee2e2;
  border: 1px solid #dc2626;
  color: #dc2626;
  font-weight: 600;
}

/* ============ 办结/未办结 状态标签 ============ */
.status-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  margin-right: 6px;
}

.status-tag.completed {
  background: #dcfce7;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.status-tag.incomplete {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* ============ 网格员上报镇：村级只读提示 ============ */
.view-only-hint {
  display: inline-block;
  padding: 4px 12px;
  background: #eff6ff;
  color: #1d4ed;
  border-radius: 6px;
  font-size: 13px;
  border: 1px solid #bfdbfe;
}

/* ============ 镇级审核弹窗优化 ============ */
#reviewComment {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
}

#reviewComment:focus {
  outline: none;
  border-color: var(--gov-red);
  box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.review-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.review-actions .btn {
  flex: 1;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
}

/* ============ 案件统计条（村级界面） ============ */
.case-stats-bar {
  display: flex;
  gap: 16px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 12px;
  padding: 14px 20px;
  margin-top: 14px;
  border: 1px solid #fbbf24;
}

.stat-item {
  flex: 1;
  text-align: center;
  padding: 6px 0;
  border-right: 1px solid rgba(0,0,0,0.08);
}

.stat-item:last-child {
  border-right: none;
}

.stat-num {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--gov-red);
}

.stat-label {
  display: block;
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

.stat-pending .stat-num { color: #d97706; }
.stat-reviewing .stat-num { color: #2563eb; }
.stat-resolved .stat-num { color: #16a34a; }
.stat-rejected .stat-num { color: #dc2626; }

/* 提交照片展示 */
.submit-photo-area {
  margin-top: 8px;
  padding: 8px;
  background: #f9fafb;
  border-radius: 8px;
}

.submit-photo-thumb {
  max-width: 200px;
  max-height: 150px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid #e5e7eb;
  transition: transform 0.2s;
}

.submit-photo-thumb:hover {
  transform: scale(1.03);
  border-color: var(--gov-red);
}

/* 村级管理 - 各村统计卡片 */
.village-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.village-stat-card {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.village-stat-card:hover {
  border-color: var(--gov-red);
  box-shadow: 0 2px 8px rgba(196,30,58,0.15);
  transform: translateY(-2px);
}

.village-stat-card.vs-active {
  border-color: var(--gov-red);
  background: #fef2f2;
}

.vs-village-name {
  font-weight: 700;
  color: #374151;
  font-size: 14px;
  margin-bottom: 4px;
}

.vs-stats-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.vs-total {
  font-size: 24px;
  font-weight: 800;
  color: var(--gov-red);
}

.vs-label {
  font-size: 11px;
  color: #999;
}

.vs-details {
  display: flex;
  justify-content: space-around;
  margin-top: 6px;
  font-size: 11px;
  color: #666;
}

.vs-pending { color: #d97706; }
.vs-resolved { color: #16a34a; }

/* 村级卡片作为链接：去除默认下划线、继承文字色 */
a.village-stat-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* 卡片底部"去提交诉求"提示 */
.vs-go {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gov-red);
  opacity: 1;
  transition: opacity 0.2s;
}
.village-stat-card:hover .vs-go {
  opacity: 1;
}
/* 选中村的卡片高亮 */
.village-stat-card.active {
  border-color: var(--gov-red);
  box-shadow: 0 4px 14px rgba(196, 30, 58, 0.28);
  background: #fff5f6;
}
.village-stat-card.active .vs-village-name {
  color: var(--gov-red);
}
/* 村级记录筛选横幅 */
.village-filter-banner {
  background: linear-gradient(135deg, #fdecef, #fff5f6);
  border: 1px solid #f3b9c2;
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 12px;
  font-size: 14px;
  color: #8a1f33;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.village-filter-banner strong {
  color: var(--gov-red);
  font-size: 15px;
}
.filter-back-btn {
  margin-left: auto;
  background: var(--gov-red);
  color: #fff;
  border-radius: 18px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.filter-back-btn:hover {
  background: #a81832;
}

/* 百姓提交页：村级横幅提示 */
.village-banner {
  background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
  border: 1px solid #a5d6a7;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 14px;
  color: #2e7d32;
}
.village-banner strong {
  color: var(--gov-red);
}

/* 村级管理员表格 */
.village-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 10px;
}

.village-admin-table th,
.village-admin-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.village-admin-table th {
  background: #f3f4f6;
  font-weight: 600;
  color: #374151;
}

.village-admin-table code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* 村民标签（公开看板诉求卡片上显示所属村） */
.appeal-village-tag {
  display: inline-block;
  background: #e8f4fd;
  color: #1e40af;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
  white-space: nowrap;
}
