* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f5f6fa; color: #333; font-size: 15px; -webkit-tap-highlight-color: transparent; }
.page { display:none; min-height:100vh; } .page.active { display:block; }

/* 登录 */
.login-container { padding:60px 24px 40px; max-width:400px; margin:0 auto; }
.login-logo { font-size:56px; text-align:center; margin-bottom:12px; }
.login-title { text-align:center; font-size:22px; font-weight:700; color:#2c3e50; margin-bottom:4px; }
.login-subtitle { text-align:center; font-size:13px; color:#999; margin-bottom:32px; }
.form-group { margin-bottom:16px; }
.form-group label { display:block; font-size:13px; font-weight:600; color:#555; margin-bottom:6px; }
.form-group .hint { font-weight:400; color:#999; font-size:11px; }
.form-group input, .form-group select { width:100%; padding:12px 14px; border:1px solid #ddd; border-radius:8px; font-size:15px; outline:none; transition:border 0.2s; background:#fff; }
.form-group input:focus, .form-group select:focus { border-color:#3498db; }
.btn-primary { display:block; width:100%; padding:14px; background:#3498db; color:#fff; border:none; border-radius:10px; font-size:16px; font-weight:600; cursor:pointer; margin-top:20px; }
.btn-primary:active { background:#2980b9; }
.btn-primary:disabled { background:#bdc3c7; }
.msg { text-align:center; margin-top:12px; font-size:13px; min-height:20px; }
.msg.error { color:#e74c3c; } .msg.success { color:#27ae60; }
.select-hint { font-size:13px; color:#666; margin:16px 0 8px; text-align:center; }
.login-footer { margin-top:40px; text-align:center; }
.link-secondary { color:#999; font-size:13px; text-decoration:none; }
.link-secondary:active { color:#666; }

/* 租户选择列表 */
#tenantList .tenant-item { padding:14px 16px; background:#fff; border-radius:8px; margin-bottom:8px; border:1px solid #eee; cursor:pointer; }
#tenantList .tenant-item:active { background:#f0f7ff; border-color:#3498db; }
#tenantList .tenant-item .t-name { font-weight:600; font-size:15px; color:#333; }
#tenantList .tenant-item .t-farmer { font-size:12px; color:#888; margin-top:2px; }

/* 身份证上传 */
.idcard-upload { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 12px; padding: 20px; margin-bottom: 20px; cursor: pointer; text-align: center; color: white; box-shadow: 0 4px 15px rgba(102,126,234,0.4); transition: transform 0.2s; }
.idcard-upload:active { transform: scale(0.98); }
.upload-icon { font-size: 40px; margin-bottom: 8px; }
.upload-text { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.upload-hint { font-size: 12px; opacity: 0.9; }


/* 主页 */
.home-header { display:flex; justify-content:space-between; align-items:center; padding:20px 20px 10px; }
.user-info { display:flex; flex-direction:column; }
.user-name { font-size:20px; font-weight:700; color:#2c3e50; }
.tenant-name { font-size:12px; color:#999; margin-top:2px; }
.btn-logout { padding:6px 14px; border:1px solid #ddd; border-radius:6px; background:#fff; color:#999; font-size:12px; cursor:pointer; }
.home-cards { padding:10px 16px; }
.card { background:#fff; border-radius:14px; padding:24px 20px; margin-bottom:14px; box-shadow:0 2px 8px rgba(0,0,0,0.04); cursor:pointer; display:flex; align-items:center; gap:16px; transition:transform 0.1s; }
.card:active { transform:scale(0.98); }
.card-icon { font-size:36px; width:50px; text-align:center; flex-shrink:0; }
.card-title { font-size:17px; font-weight:600; color:#2c3e50; }
.card-desc { font-size:13px; color:#888; margin-top:2px; }
.card-land { border-left:4px solid #27ae60; }
.card-family { border-left:4px solid #3498db; }
.card-contract { border-left:4px solid #f39c12; }
.card-apply { border-left:4px solid #9b59b6; }
.home-footer { text-align:center; padding:20px 0 40px; }

/* 子页面导航 */
.page-nav { display:flex; align-items:center; gap:10px; padding:14px 16px; background:#fff; border-bottom:1px solid #eee; position:sticky; top:0; z-index:10; }
.btn-back { border:none; background:none; font-size:16px; color:#3498db; cursor:pointer; padding:4px 8px; font-weight:600; }
.nav-title { font-size:16px; font-weight:600; color:#2c3e50; }
.content-scroll { padding:16px; padding-bottom:40px; }

/* 数据卡片 */
.data-card { background:#fff; border-radius:10px; padding:16px; margin-bottom:12px; box-shadow:0 1px 4px rgba(0,0,0,0.04); }
.data-card-title { font-size:15px; font-weight:600; color:#2c3e50; margin-bottom:10px; padding-bottom:8px; border-bottom:1px solid #f0f0f0; }
.data-row { display:flex; padding:5px 0; font-size:13px; }
.data-label { color:#888; min-width:80px; flex-shrink:0; }
.data-value { color:#333; flex:1; word-break:break-all; }

/* 状态标签 */
.status-tag { display:inline-block; padding:2px 8px; border-radius:4px; font-size:11px; font-weight:600; }
.status-approved { background:#d5f5e3; color:#27ae60; }
.status-processing { background:#fef9e7; color:#f39c12; }
.status-rejected { background:#fdecea; color:#e74c3c; }
.status-pending { background:#eee; color:#999; }
.status-cancelled { background:#f0f0f0; color:#aaa; }

/* 申请类型列表 */
.apply-item { padding:16px; background:#fff; border-radius:10px; margin-bottom:10px; cursor:pointer; display:flex; align-items:center; gap:12px; box-shadow:0 1px 4px rgba(0,0,0,0.04); }
.apply-item:active { background:#f8f9fa; }
.apply-item .a-icon { font-size:24px; }
.apply-item .a-name { font-size:15px; font-weight:600; color:#333; }
.apply-item .a-desc { font-size:12px; color:#999; margin-top:2px; }
.apply-item .a-arrow { color:#ccc; margin-left:auto; font-size:18px; }

/* 表单 */
.form-section { background:#fff; border-radius:10px; padding:16px; margin-bottom:12px; }
.form-section-title { font-size:14px; font-weight:600; color:#555; margin-bottom:12px; }
.form-field { margin-bottom:14px; }
.form-field label { display:block; font-size:13px; color:#666; margin-bottom:4px; }
.form-field input, .form-field select, .form-field textarea { width:100%; padding:10px 12px; border:1px solid #ddd; border-radius:8px; font-size:14px; background:#fff; }
.form-field textarea { min-height:80px; resize:vertical; }
.btn-submit { display:block; width:100%; padding:14px; background:#9b59b6; color:#fff; border:none; border-radius:10px; font-size:16px; font-weight:600; cursor:pointer; margin-top:16px; }
.btn-submit:active { background:#8e44ad; }
.btn-submit:disabled { background:#bdc3c7; }

/* 空状态 */
.empty-state { text-align:center; padding:60px 20px; color:#ccc; }
.empty-state .e-icon { font-size:48px; margin-bottom:12px; }
.empty-state .e-text { font-size:14px; }

/* 时间线 */
.timeline { padding:0 4px; }
.timeline-item { display:flex; gap:12px; padding-bottom:16px; position:relative; }
.timeline-dot { width:10px; height:10px; border-radius:50%; margin-top:5px; flex-shrink:0; }
.timeline-dot.done { background:#27ae60; }
.timeline-dot.current { background:#f39c12; box-shadow:0 0 0 3px rgba(243,156,18,0.2); }
.timeline-dot.waiting { background:#ddd; }
.timeline-line { position:absolute; left:4px; top:18px; bottom:0; width:2px; background:#eee; }
.timeline-item:last-child .timeline-line { display:none; }
.timeline-info { flex:1; }
.timeline-step { font-size:14px; font-weight:600; color:#333; }
.timeline-meta { font-size:12px; color:#999; margin-top:2px; }
.timeline-comment { font-size:12px; color:#666; margin-top:4px; background:#f8f9fa; padding:6px 10px; border-radius:6px; }

/* 材料上传 */
.upload-area { padding: 16px; text-align: center; border-bottom: 1px solid #f0f0f0; }
.btn-upload { background: linear-gradient(135deg, #2e7d32, #4caf50); color: white; border: none; padding: 12px 32px; border-radius: 24px; font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: 0 2px 8px rgba(46,125,50,0.3); }
.btn-upload:active { transform: scale(0.95); }
.upload-hint { font-size: 12px; color: #999; margin-top: 8px; }
.progress-bar { height: 4px; background: #e0e0e0; border-radius: 2px; margin-top: 12px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #4caf50, #66bb6a); width: 0; transition: width 0.3s; border-radius: 2px; }
.progress-text { font-size: 12px; color: #666; margin-top: 4px; }

.file-filter { display: flex; gap: 8px; padding: 12px 16px; border-bottom: 1px solid #f0f0f0; }
.filter-btn { padding: 6px 16px; border: 1px solid #e0e0e0; border-radius: 16px; background: white; font-size: 13px; color: #666; cursor: pointer; }
.filter-btn.active { background: #e8f5e9; border-color: #4caf50; color: #2e7d32; font-weight: 600; }

.file-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #f5f5f5; }
.file-thumb { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; flex-shrink: 0; cursor: pointer; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-icon { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; background: #f5f5f5; border-radius: 8px; font-size: 24px; flex-shrink: 0; }
.file-info { flex: 1; min-width: 0; }
.file-name { font-size: 14px; font-weight: 500; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { font-size: 12px; color: #999; margin-top: 2px; }
.file-remark { font-size: 12px; color: #666; margin-top: 2px; }
.file-actions { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.file-btn { padding: 4px 12px; border: 1px solid #e0e0e0; border-radius: 4px; background: white; font-size: 12px; color: #666; text-decoration: none; text-align: center; cursor: pointer; }
.file-btn-del { color: #e74c3c; border-color: #ffcdd2; }

.card-files { border-left: 4px solid #9c27b0; }

.e-hint { font-size: 12px; color: #bbb; margin-top: 4px; }

/* 我的留言 */
.card-msg { border-left: 4px solid #ff9800; }
.btn-new-msg { background: #4caf50; color: white; border: none; padding: 6px 14px; border-radius: 16px; font-size: 13px; cursor: pointer; margin-left: auto; }
.msg-filter { display: flex; gap: 8px; padding: 12px 16px; border-bottom: 1px solid #f0f0f0; }
.msg-item { padding: 14px 16px; border-bottom: 1px solid #f0f0f0; cursor: pointer; }
.msg-item:active { background: #f9f9f9; }
.msg-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.msg-cat { font-size: 12px; color: #666; background: #f0f0f0; padding: 2px 8px; border-radius: 10px; }
.msg-item-title { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 4px; }
.msg-item-preview { font-size: 13px; color: #888; line-height: 1.4; }
.msg-item-footer { display: flex; gap: 12px; margin-top: 8px; font-size: 12px; color: #aaa; }
.msg-detail-content { padding: 12px 0; font-size: 14px; line-height: 1.7; color: #444; }
.msg-attachments { padding: 8px 0; }
.attach-title { font-size: 13px; color: #666; font-weight: 600; margin-bottom: 8px; }
.attach-img { display: inline-block; width: 80px; height: 80px; border-radius: 6px; overflow: hidden; margin: 0 8px 8px 0; cursor: pointer; }
.attach-img img { width: 100%; height: 100%; object-fit: cover; }
.attach-file { display: inline-block; padding: 6px 12px; background: #f5f5f5; border-radius: 6px; font-size: 13px; color: #666; text-decoration: none; margin: 0 8px 8px 0; }
.reply-card { border-left: 3px solid #4caf50; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 14px; font-weight: 600; color: #333; margin-bottom: 6px; }
.form-field select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; background: white; }
.form-field input[type="text"] { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; }
.form-field textarea { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; resize: vertical; }
.char-count { text-align: right; font-size: 12px; color: #999; margin-top: 4px; }
.btn-add-attach { background: white; border: 1px dashed #ccc; color: #666; padding: 10px; border-radius: 8px; width: 100%; font-size: 14px; cursor: pointer; }
.btn-add-attach:active { background: #f9f9f9; }
.attach-list { margin-top: 8px; }
.attach-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #f5f5f5; }
.attach-thumb { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; }
.attach-icon { font-size: 20px; }
.attach-name { flex: 1; font-size: 13px; color: #666; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-remove { background: none; border: none; color: #e74c3c; font-size: 18px; cursor: pointer; padding: 4px 8px; }
.btn-submit-msg { width: 100%; padding: 14px; background: linear-gradient(135deg, #2e7d32, #4caf50); color: white; border: none; border-radius: 24px; font-size: 16px; font-weight: 600; cursor: pointer; margin-top: 8px; }
.btn-submit-msg:active { transform: scale(0.98); }
