/* ========== 全局重置 ========== */
* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
}
body { 
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "微软雅黑", sans-serif;
  background: #f5f5f5;
  color: #333;
  font-size: 14px;
}
:root {
  --primary: #2c5aa0;
  --primary-light: #e8f0fe;
  --success: #67c23a;
  --warning: #e6a23c;
  --danger: #e64340;
  --border: #ddd;
  --text-secondary: #666;
  --text-tertiary: #999;
}

/* ========== 群众提交页 ========== */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 15px 40px;
}
.title { 
  text-align: center; 
  font-size: 22px; 
  color: var(--primary); 
  margin-bottom: 5px; 
}
.subtitle { 
  text-align: center; 
  color: var(--text-tertiary); 
  font-size: 14px; 
  margin-bottom: 20px; 
}
.form-item { 
  margin-bottom: 18px; 
}
.form-item label { 
  display: block; 
  margin-bottom: 6px; 
  font-size: 14px; 
  color: #555; 
}
.red { 
  color: var(--danger); 
}
.form-item input,
.form-item select,
.form-item textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}
.form-item input:focus,
.form-item select:focus,
.form-item textarea:focus {
  border-color: var(--primary);
}
.form-item textarea { 
  resize: vertical; 
  min-height: 80px;
}
.radio-group { 
  display: flex; 
  gap: 20px; 
}
.radio-group label { 
  display: flex; 
  align-items: center; 
  gap: 5px; 
  margin-bottom: 0;
  cursor: pointer;
}

/* 录音按钮 */
.voice-box {
  display: flex;
  align-items: center;
  gap: 12px;
}
.voice-record-btn {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--primary);
  background: #fff;
  color: var(--primary);
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.voice-record-btn:hover {
  background: var(--primary);
  color: #fff;
}
.voice-record-btn.recording {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}
.voice-icon {
  font-size: 18px;
}
.voice-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  background: #f5f7fa;
  border-radius: 6px;
  height: 40px;
}
.voice-del {
  color: var(--danger);
  cursor: pointer;
  font-size: 13px;
  background: none;
  border: none;
}
.voice-tip {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 6px;
}

/* 上传图片区域 */
.upload-area { 
  border: 1px dashed #ccc; 
  border-radius: 6px; 
  padding: 16px; 
  background: #fff; 
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.img-list { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 8px; 
}
.img-item { 
  position: relative; 
  width: 70px; 
  height: 70px; 
  flex-shrink: 0;
}
.img-item img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  border-radius: 4px; 
}
.del-btn {
  position: absolute; 
  top: -5px; 
  right: -5px;
  width: 18px; 
  height: 18px; 
  line-height: 16px;
  background: rgba(0,0,0,0.6); 
  color: #fff;
  border-radius: 50%; 
  text-align: center; 
  font-size: 14px;
  cursor: pointer;
}
.add-btn {
  width: 90px;
  height: 64px;
  border: 1px dashed #aaa;
  border-radius: 4px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #666;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 13px;
  background: #fafafa;
  transition: all 0.2s;
  white-space: nowrap;
}
.add-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.submit-btn {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s;
}
.submit-btn:hover {
  background: #234a85;
}
.submit-btn:disabled { 
  background: #999; 
  cursor: not-allowed;
}

/* 干部联系方式卡片 */
.contact-card {
  margin-top: 24px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
}
.contact-header {
  padding: 14px 16px;
  background: #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: #333;
}
.contact-body {
  padding: 12px 16px;
  display: none;
}
.contact-item {
  padding: 10px 0;
  border-bottom: 1px dashed #eee;
}
.contact-item:last-child {
  border-bottom: none;
}
.contact-name {
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--primary);
}
.contact-info {
  color: #666;
  font-size: 13px;
}

/* ========== 登录页 ========== */
.login-box {
  max-width: 360px;
  margin: 80px auto;
  padding: 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.login-box h2 { 
  text-align: center; 
  margin-bottom: 20px; 
  color: var(--primary); 
}

/* ========== 通用组件 ========== */
.toast {
  display: none;
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 12px 24px;
  border-radius: 6px;
  z-index: 9999;
  max-width: 80%;
  text-align: center;
}
.empty {
  text-align: center;
  padding: 60px;
  color: #999;
}
/* 通讯录分级标题 */
.contact-section-title{
  font-weight: 600;
  color: var(--primary);
  margin: 12px 0 8px;
  font-size: 15px;
  border-left: 3px solid var(--primary);
  padding-left: 8px;
}
.contact-section-title:first-child{
  margin-top: 0;
}
