/* ============================================================
   移动端样式 - 百姓提交 / 网格员提交
   政务风格：简洁、端庄、易用
   ============================================================ */

/* 移动端页面容器 */
.mobile-page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: linear-gradient(180deg, #fdfbf7 0%, #f8f6f1 100%);
  display: flex;
  flex-direction: column;
}

/* 顶部政务标识 */
.mobile-header {
  background: linear-gradient(135deg, #c41e3a, #8b1a2b);
  color: #fff;
  padding: 28px 20px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* 顶部App图标 */
.app-icon-wrap {
  margin-bottom: 12px;
}

.app-header-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  border: 2px solid rgba(255,255,255,0.3);
}

.mobile-header::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 30px;
  background: #fdfbf7;
  border-radius: 50%;
}

.mobile-header.gridworker {
  background: linear-gradient(135deg, #1a3a5c, #0f2440);
}

.gov-emblem {
  font-size: 40px;
  margin-bottom: 8px;
}

.mobile-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.4;
  margin-bottom: 6px;
}

.mobile-subtitle {
  font-size: 14px;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

/* 登录状态 */
.login-status {
  padding: 12px 16px;
  font-size: 14px;
  background: #fff;
  margin: 0 16px;
  margin-top: -10px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: relative;
  z-index: 2;
}

.status-logged-in {
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-not-logged-in {
  color: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logout-link, .login-link {
  color: #c41e3a;
  font-weight: 600;
  text-decoration: none;
  font-size: 13px;
}

/* 表单卡片 */
.mobile-form-card {
  background: #fff;
  margin: 20px 16px;
  padding: 24px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  flex-shrink: 0;
}

.form-card-title {
  font-size: 17px;
  font-weight: 700;
  color: #c41e3a;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f5e6c8;
}
.form-card-village {
  font-size: 13px;
  font-weight: 400;
  color: #d97706;
  background: #fef3c7;
  padding: 2px 10px;
  border-radius: 12px;
  margin-left: 6px;
}

/* 表单元素 */
.mobile-form-card .form-group {
  margin-bottom: 18px;
}

.mobile-form-card label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}

.mobile-form-card .required {
  color: #dc2626;
}

.mobile-form-card .input-field {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e5ddd0;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: #fdfbf7;
  color: #1a1a1a;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

.mobile-form-card .input-field:focus {
  outline: none;
  border-color: #c41e3a;
  box-shadow: 0 0 0 3px rgba(196,30,58,0.08);
}

.mobile-form-card textarea.input-field {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.mobile-form-card .input-field::placeholder {
  color: #c4b99a;
  font-size: 14px;
}

/* 复选框组 */
.checkbox-group {
  margin: 20px 0;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 14px;
  background: #fdfbf7;
  border: 1.5px solid #e5ddd0;
  border-radius: 10px;
  transition: all 0.2s;
}

.checkbox-label:hover {
  border-color: #d4a853;
  background: #fef9f0;
}

.checkbox-input {
  display: none;
}

.checkbox-custom {
  width: 22px;
  height: 22px;
  border: 2px solid #c4b99a;
  border-radius: 4px;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s;
  margin-top: 2px;
}

.checkbox-input:checked + .checkbox-custom {
  background: #c41e3a;
  border-color: #c41e3a;
}

.checkbox-input:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
}

.checkbox-text strong {
  font-weight: 600;
  color: #1a1a1a;
}

.checkbox-text small {
  font-size: 12px;
  color: #999;
}

/* 提交按钮 */
.btn-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #c41e3a, #8b1a2b);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 2px;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(196,30,58,0.3);
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(196,30,58,0.4);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.7;
  transform: none;
  cursor: not-allowed;
}

/* 说明卡片 */
.mobile-info-card {
  margin: 0 16px 16px;
  padding: 14px 16px;
  background: #fffdf5;
  border: 1px solid #fde68a;
  border-radius: 10px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-shrink: 0;
}

.info-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.info-text {
  font-size: 13px;
  color: #666;
  line-height: 1.7;
}

.info-text strong {
  color: #c41e3a;
}

/* 宣传标语轮播 */
.slogan-marquee {
  margin: auto 12px 12px;
  padding: 14px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  overflow: hidden;
  flex-shrink: 0;
}

.slogan-track {
  display: flex;
  gap: 0;
  animation: marquee 60s linear infinite;
  white-space: nowrap;
}

.slogan-item {
  display: inline-block;
  padding: 6px 24px;
  font-size: 13px;
  color: #666;
  flex-shrink: 0;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* 底部 */
.mobile-footer {
  text-align: center;
  padding: 20px 16px 30px;
  flex-shrink: 0;
}

.mobile-footer p {
  font-size: 14px;
  font-weight: 600;
  color: #c41e3a;
}

.mobile-footer .footer-small {
  font-size: 12px;
  color: #999;
  font-weight: 400;
  margin-top: 4px;
}

/* ============ Toast 提示 ============ */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-120px);
  background: #fff;
  padding: 16px 24px;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2000;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-left: 4px solid #16a34a;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

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

.toast-text {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
}

/* ============ 横屏适配 ============ */
@media (min-width: 481px) {
  .mobile-page {
    box-shadow: 0 0 40px rgba(0,0,0,0.1);
    min-height: 100vh;
  }
}

/* ============ 系统字体优化 ============ */
@media (-webkit-min-device-pixel-ratio: 2) {
  .input-field, .btn-submit {
    font-size: 16px; /* 防iOS缩放 */
  }
}

/* ============ PWA 安装提示（Android） ============ */
.install-prompt {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 448px;
  margin: 0 auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  z-index: 1500;
  animation: slideUp 0.4s ease;
}

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

.install-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.install-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.install-text strong {
  font-size: 15px;
  color: #1a1a1a;
  font-weight: 700;
}

.install-text span {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

.install-btn {
  background: linear-gradient(135deg, #c41e3a, #8b1a2b);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}

.install-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #ccc;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
  line-height: 1;
}

/* ============ iOS 安装引导 ============ */
.ios-guide {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 448px;
  margin: 0 auto;
  z-index: 1500;
  transition: opacity 0.3s;
}

.ios-guide-content {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  padding: 18px 20px;
  position: relative;
  border-top: 3px solid #c41e3a;
}

.ios-guide-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 20px;
  color: #ccc;
  cursor: pointer;
  line-height: 1;
}

.ios-guide-title {
  font-size: 16px;
  font-weight: 700;
  color: #c41e3a;
  margin-bottom: 10px;
}

.ios-guide-content p {
  font-size: 13px;
  color: #555;
  margin: 6px 0;
  line-height: 1.5;
}

.ios-guide-content strong {
  color: #1a1a1a;
}

/* ============ 照片上传（移动端） ============ */
.photo-upload-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #374151;
}

.photo-upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #f9fafb;
}

.photo-upload-area:active {
  border-color: var(--gov-red);
  background: #fef2f2;
}

#photoUploadHint .upload-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 4px;
}

#photoUploadHint span {
  display: block;
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 2px;
}

#photoUploadHint small {
  color: #9ca3af;
  font-size: 12px;
}

/* 村庄选择下拉 */
.select-field {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px !important;
}
