/* 全局样式 - 手机端优先 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #f5f6fa; color: #333; line-height: 1.6;
}
.container { max-width: 640px; margin: 0 auto; padding: 16px; }

/* 顶部 */
.header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff; padding: 28px 20px; text-align: center;
}
.header h1 { font-size: 22px; margin-bottom: 6px; }
.header p { font-size: 13px; opacity: 0.8; }

/* 卡片 */
.card {
    background: #fff; border-radius: 12px; padding: 20px;
    margin-bottom: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.card h2 { font-size: 17px; margin-bottom: 14px; color: #1a1a2e; }

/* 表单 */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 14px; margin-bottom: 6px; color: #555; font-weight: 500; }
.form-group label .req { color: #e74c3c; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 11px 12px; border: 1px solid #ddd;
    border-radius: 8px; font-size: 15px; background: #fafafa;
    transition: border 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: #4a6cf7; background: #fff;
}
.form-group .hint { font-size: 12px; color: #999; margin-top: 4px; }

/* 按钮 */
.btn {
    display: block; width: 100%; padding: 14px; border: none;
    border-radius: 10px; font-size: 16px; font-weight: 600;
    cursor: pointer; text-align: center; text-decoration: none;
    transition: opacity 0.2s;
}
.btn:active { opacity: 0.85; }
.btn-primary { background: #4a6cf7; color: #fff; }
.btn-dark { background: #1a1a2e; color: #fff; }
.btn-success { background: #27ae60; color: #fff; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-outline { background: #fff; color: #4a6cf7; border: 2px solid #4a6cf7; }
.btn:disabled { background: #aaa; cursor: not-allowed; }

/* 首页三入口 */
.entry-list { margin-top: 20px; }
.entry-item {
    display: flex; align-items: center; padding: 18px 16px;
    background: #fff; border-radius: 12px; margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); text-decoration: none;
    color: #333; transition: transform 0.15s;
}
.entry-item:active { transform: scale(0.98); }
.entry-icon {
    width: 48px; height: 48px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin-right: 14px; flex-shrink: 0;
}
.entry-icon.buy { background: #e8f0fe; }
.entry-icon.sell { background: #fde8e8; }
.entry-icon.rent { background: #e8f8ef; }
.entry-text h3 { font-size: 16px; margin-bottom: 2px; }
.entry-text p { font-size: 12px; color: #888; }
.entry-arrow { margin-left: auto; color: #ccc; font-size: 20px; }

/* 签名板 */
.signature-pad {
    border: 2px dashed #ccc; border-radius: 8px;
    background: #fff; touch-action: none;
    width: 100%; height: 200px;
}
.signature-actions { display: flex; gap: 10px; margin-top: 10px; }
.signature-actions .btn { margin: 0; }

/* 视频录制 */
.video-preview {
    width: 100%; border-radius: 8px; background: #000;
    margin-bottom: 12px; aspect-ratio: 3/4;
}
.recording-indicator {
    display: none; align-items: center; justify-content: center;
    gap: 6px; color: #e74c3c; font-size: 14px; margin-bottom: 10px;
}
.recording-indicator.active { display: flex; }
.rec-dot {
    width: 10px; height: 10px; background: #e74c3c;
    border-radius: 50%; animation: blink 1s infinite;
}
@keyframes blink { 50% { opacity: 0.3; } }

/* 话术框 */
.script-box {
    background: #fff8e6; border-left: 4px solid #f39c12;
    padding: 14px; border-radius: 0 8px 8px 0; margin: 12px 0;
    font-size: 13px; line-height: 1.8; color: #6b4c00;
}
.script-box strong { color: #d35400; }

/* 步骤指示 */
.steps {
    display: flex; justify-content: space-between;
    padding: 16px 0; margin-bottom: 10px;
}
.step { flex: 1; text-align: center; font-size: 12px; color: #aaa; position: relative; }
.step.active { color: #4a6cf7; font-weight: 600; }
.step.done { color: #27ae60; }
.step-num {
    width: 26px; height: 26px; line-height: 26px; border-radius: 50%;
    background: #eee; margin: 0 auto 4px; font-size: 13px;
}
.step.active .step-num { background: #4a6cf7; color: #fff; }
.step.done .step-num { background: #27ae60; color: #fff; }

/* 合同展示 */
.contract-doc {
    background: #fff; padding: 24px 20px; border-radius: 8px;
    font-size: 14px; line-height: 1.9;
}
.contract-doc h2 { text-align: center; font-size: 18px; margin-bottom: 16px; }
.contract-doc .clause { margin-bottom: 12px; text-indent: 2em; }
.contract-doc .sign-area { margin-top: 30px; display: flex; justify-content: space-between; }

/* 后台表格 */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid #eee; text-align: left; }
.table th { background: #f8f9fa; font-weight: 600; }
.table a { color: #4a6cf7; text-decoration: none; }
.badge {
    display: inline-block; padding: 2px 8px; border-radius: 10px;
    font-size: 11px; font-weight: 600;
}
.badge.completed { background: #e8f8ef; color: #27ae60; }
.badge.draft { background: #fff3e0; color: #f39c12; }

/* 提示框 */
.alert {
    padding: 12px 14px; border-radius: 8px; margin-bottom: 14px;
    font-size: 14px;
}
.alert-info { background: #e8f0fe; color: #1a56db; }
.alert-success { background: #e8f8ef; color: #1e7e34; }
.alert-warning { background: #fff3e0; color: #b26a00; }

/* 底部 */
.footer { text-align: center; padding: 20px; font-size: 12px; color: #aaa; }
