/* 铜鼓县医院留言投诉 - 前台样式 */
:root {
  --primary: #0c7ea8;
  --primary-dark: #096688;
  --primary-light: #e8f5fa;
  --accent: #1aa88a;
  --accent-light: #e8f7f3;
  --text: #1e2d3a;
  --text-secondary: #5a6d7a;
  --muted: #8a9ba8;
  --bg: #f3f7fa;
  --card: #ffffff;
  --border: #e2ebf0;
  --danger: #e05252;
  --warning: #e6a23c;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(12, 90, 130, 0.07);
  --header-h: 52px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-tap-highlight-color: transparent; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  font-size: 15px;
}
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ===== 首页 ===== */
.home-page {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(12, 126, 168, 0.14), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 100%, rgba(26, 168, 138, 0.08), transparent 50%),
    linear-gradient(180deg, #eef6fa 0%, #f5f9fb 45%, #f0f6f4 100%);
  padding: 0 20px 40px;
  display: flex;
  flex-direction: column;
}

.home-hero {
  padding: 48px 8px 36px;
  text-align: center;
  animation: fadeUp 0.5s ease both;
}
.home-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(12, 126, 168, 0.1);
  color: var(--primary);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}
.home-badge svg { width: 14px; height: 14px; }
.home-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.home-sub {
  font-size: 14px;
  color: var(--text-secondary);
}

.home-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

.action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 24px;
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: 0 6px 28px rgba(12, 80, 120, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: fadeUp 0.55s ease both;
}
.action-card:nth-child(2) { animation-delay: 0.08s; }
.action-card:active { transform: scale(0.985); }
.action-card.message {
  background: linear-gradient(135deg, #f0faf5 0%, #ffffff 55%, #eef8f4 100%);
}
.action-card.complaint {
  background: linear-gradient(135deg, #eef6fb 0%, #ffffff 55%, #e8f3f9 100%);
}
.action-card .info { flex: 1; padding-right: 12px; z-index: 1; }
.action-card h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.action-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}
.action-card .icon-wrap {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.action-card .icon-wrap svg {
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 8px 16px rgba(12, 126, 168, 0.25));
}
.home-footer {
  text-align: center;
  padding: 28px 0 8px;
  font-size: 12px;
  color: var(--muted);
  animation: fadeUp 0.6s ease 0.12s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 通用头部 ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: linear-gradient(135deg, #0c8ab8 0%, #0c7ea8 50%, #0a6e94 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 48px;
  box-shadow: 0 2px 12px rgba(12, 100, 140, 0.25);
}
.app-header h1 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-header .back {
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
}
.app-header .back svg { width: 22px; height: 22px; }

/* ===== 表单页 ===== */
.page-body {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

.contact-banner {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--primary);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-line;
}

.form-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 8px 16px 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.field {
  padding: 14px 0;
  border-bottom: 1px solid #f0f4f7;
}
.field:last-child { border-bottom: none; }
.field-label {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.field-label .req {
  color: var(--danger);
  margin-right: 4px;
  font-weight: 700;
}
.field input[type="text"],
.field input[type="tel"],
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--border);
  background: #f7fafc;
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(12, 126, 168, 0.12);
}
.field textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}
.field .select-wrap {
  position: relative;
}
.field .select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-60%) rotate(45deg);
  pointer-events: none;
}
.field select {
  padding-right: 36px;
  color: var(--text);
}
.field select:invalid,
.field select.placeholder {
  color: var(--muted);
}

/* 图片上传 */
.upload-area {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.upload-item, .upload-btn {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  position: relative;
}
.upload-btn {
  border: 1.5px dashed #c5d5de;
  background: #f7fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  transition: border-color 0.2s, color 0.2s;
}
.upload-btn:hover { border-color: var(--primary); color: var(--primary); }
.upload-btn svg { width: 28px; height: 28px; margin-bottom: 2px; }
.upload-btn span { font-size: 11px; }
.upload-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}
.upload-item .remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  border: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(224,82,82,.4);
}
.upload-tip {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

/* 按钮 */
.btn-primary {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #1294c4 0%, #0c7ea8 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(12, 126, 168, 0.32);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-outline {
  display: block;
  width: 100%;
  padding: 13px;
  margin-top: 12px;
  border: 1.5px solid var(--primary);
  border-radius: 12px;
  background: #fff;
  color: var(--primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
.btn-group { margin-top: 8px; padding: 0 0 8px; }

.page-footer {
  text-align: center;
  padding: 20px 0 8px;
  font-size: 12px;
  color: var(--muted);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  top: 20%;
  transform: translateX(-50%) translateY(-10px);
  background: rgba(30, 45, 58, 0.92);
  color: #fff;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  max-width: 80%;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== 成功页 ===== */
.success-box {
  text-align: center;
  padding: 48px 24px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 24px;
}
.success-box .check {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(145deg, #e8f7f3, #d4f0e8);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  animation: popIn 0.4s ease both;
}
.success-box .check svg { width: 36px; height: 36px; }
.success-box h2 { font-size: 20px; margin-bottom: 8px; }
.success-box p { color: var(--text-secondary); font-size: 14px; margin-bottom: 6px; }
.success-box .ticket {
  display: inline-block;
  margin: 12px 0 24px;
  padding: 8px 16px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}
@keyframes popIn {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ===== 我的反馈 ===== */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.search-bar input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  outline: none;
}
.search-bar input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(12,126,168,.12);
}
.search-bar button {
  padding: 0 18px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.fb-list { display: flex; flex-direction: column; gap: 12px; }
.fb-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.fb-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.fb-type {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
}
.fb-type.message { background: var(--accent-light); color: var(--accent); }
.fb-type.complaint { background: #fef0f0; color: var(--danger); }
.fb-status {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
}
.fb-status.pending { background: #fff7e6; color: #d48806; }
.fb-status.processing { background: var(--primary-light); color: var(--primary); }
.fb-status.replied { background: var(--accent-light); color: var(--accent); }
.fb-status.closed { background: #f0f2f5; color: var(--muted); }
.fb-content {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fb-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}
.fb-reply {
  margin-top: 12px;
  padding: 12px;
  background: #f7fafc;
  border-radius: 10px;
  border-left: 3px solid var(--primary);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.fb-reply strong { color: var(--primary); display: block; margin-bottom: 4px; font-size: 12px; }
.fb-images {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.fb-images img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
}
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state svg { width: 64px; height: 64px; margin: 0 auto 12px; opacity: 0.4; }

/* 图片预览 */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 8px; }

@media (min-width: 768px) {
  .home-title { font-size: 30px; }
  .action-card { padding: 32px 28px; }
  .action-card h2 { font-size: 24px; }
}
