/* ===== OCR 证照识别平台 全局样式 ===== */
:root {
    --primary: #1f6feb;
    --primary-dark: #1758c8;
    --primary-light: #e8f1ff;
    --text: #1f2937;
    --text-2: #6b7280;
    --border: #e5e7eb;
    --bg: #f8fafc;
    --card: #ffffff;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #d97706;
    --radius: 10px;
    --shadow: 0 4px 16px rgba(15, 23, 42, .06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { opacity: .85; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ===== 顶部导航 ===== */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .container {
    display: flex;
    align-items: center;
    gap: 32px;
    height: 64px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
}
.logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, #1f6feb, #38bdf8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 800;
}
.nav { display: flex; gap: 24px; flex: 1; }
.nav a { color: var(--text-2); font-size: 15px; }
.nav a:hover, .nav a.active { color: var(--primary); }
#header-auth { display: flex; gap: 10px; align-items: center; }

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 14px;
    cursor: pointer;
    background: #fff;
    transition: all .15s;
    text-decoration: none;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); opacity: 1; }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-outline-primary { border-color: var(--primary); color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary-light); }

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f1ff 55%, #dbeafe 100%);
    padding: 84px 0 76px;
    text-align: center;
}
.hero h1 { font-size: 40px; line-height: 1.25; margin-bottom: 16px; }
.hero h1 span { color: var(--primary); }
.hero .sub { font-size: 17px; color: var(--text-2); max-width: 640px; margin: 0 auto 30px; }
.hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    margin-top: 44px;
    flex-wrap: wrap;
}
.hero .stats .num { font-size: 28px; font-weight: 800; color: var(--primary); }
.hero .stats .label { font-size: 13px; color: var(--text-2); }

/* ===== 区块 ===== */
.section { padding: 64px 0; }
.section .sec-head { text-align: center; margin-bottom: 44px; }
.section .sec-head h2 { font-size: 28px; margin-bottom: 10px; }
.section .sec-head p { color: var(--text-2); }
.section-alt { background: #fff; }

/* ===== 功能卡片 ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}
.feature-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 20px;
    transition: all .2s;
    position: relative;
}
.feature-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: #bfdbfe; }
.feature-card .icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 14px;
}
.feature-card h3 { font-size: 16px; margin-bottom: 6px; }
.feature-card p { font-size: 13px; color: var(--text-2); }
.tag {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.tag-on { background: #e7f8ef; color: var(--success); }
.tag-soon { background: #f3f4f6; color: var(--text-2); }

/* ===== 流程步骤 ===== */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { text-align: center; padding: 20px 12px; }
.step .no {
    width: 44px; height: 44px; margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 19px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.step h4 { margin-bottom: 8px; font-size: 16px; }
.step p { font-size: 13px; color: var(--text-2); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }

/* ===== 计费 ===== */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.price-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    text-align: center;
}
.price-card.feature { border-color: var(--primary); box-shadow: 0 6px 24px rgba(31, 111, 235, .12); }
.price-card .amt { font-size: 32px; font-weight: 800; color: var(--primary); }
.price-card .amt small { font-size: 14px; color: var(--text-2); font-weight: 400; }
.price-card .desc { margin: 10px 0 16px; color: var(--text-2); font-size: 13px; min-height: 40px; }

/* ===== 页脚 ===== */
.site-footer { background: #0f172a; color: #94a3b8; padding: 36px 0; font-size: 13px; }
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.site-footer a { color: #94a3b8; margin-right: 14px; }
.site-footer a:hover { color: #fff; }

/* ===== 表单页 ===== */
.auth-wrap {
    min-height: calc(100vh - 130px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}
.auth-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 420px;
    padding: 34px 32px;
}
.auth-card h2 { text-align: center; margin-bottom: 6px; font-size: 22px; }
.auth-card .tip { text-align: center; color: var(--text-2); font-size: 13px; margin-bottom: 24px; }
.form-item { margin-bottom: 16px; }
.form-item label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.form-item input, .form-item select, .form-item textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    background: #fff;
}
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31,111,235,.12); }
.input-row { display: flex; gap: 10px; }
.input-row .grow { flex: 1; }
.code-btn { white-space: nowrap; width: 120px; font-size: 13px; }
.check-item { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-2); }
.check-item input { margin-top: 4px; }

/* ===== 个人中心 ===== */
.console-wrap { max-width: 1000px; margin: 30px auto; padding: 0 20px 60px; }
.console-head {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.console-head .phone { font-size: 18px; font-weight: 700; }
.console-head .sub { font-size: 13px; color: var(--text-2); }
.points-pill {
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 30px;
    padding: 8px 18px;
    font-weight: 700;
    font-size: 15px;
}
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 22px; flex-wrap: wrap; }
.tabs button {
    border: none;
    background: none;
    padding: 10px 18px;
    font-size: 14px;
    cursor: pointer;
    color: var(--text-2);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.panel { display: none; }
.panel.active { display: block; }

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 18px;
}
.card h3 { font-size: 16px; margin-bottom: 16px; }
.card .row { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.kv { display: flex; gap: 18px; flex-wrap: wrap; }
.kv .item { flex: 1; min-width: 200px; }
.kv .item .k { font-size: 12px; color: var(--text-2); }
.kv .item .v {
    font-size: 14px;
    font-family: Consolas, Menlo, monospace;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 7px 10px;
    word-break: break-all;
    margin-top: 4px;
}
.upload-boxes { display: flex; gap: 18px; flex-wrap: wrap; }
.upload-box { flex: 1; min-width: 200px; text-align: center; }
.upload-box .preview {
    width: 100%;
    max-width: 240px;
    aspect-ratio: 8/5;
    border: 1px dashed var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
    font-size: 13px;
    background: #f8fafc;
    overflow: hidden;
    margin: 0 auto 8px;
}
.upload-box .preview img { width: 100%; height: 100%; object-fit: cover; }
.upload-box input[type=file] { display: none; }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { background: #f8fafc; color: var(--text-2); font-weight: 600; white-space: nowrap; }
td { word-break: break-all; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; }
.badge-ok { background: #e7f8ef; color: var(--success); }
.badge-wait { background: #fef3c7; color: var(--warning); }
.badge-fail { background: #fee2e2; color: var(--danger); }
.badge-info { background: #e0f2fe; color: #0369a1; }

/* ===== 文档页 ===== */
.doc-wrap { max-width: 960px; margin: 30px auto; padding: 0 20px 60px; }
.doc-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
}
.doc-card h2 { font-size: 20px; margin-bottom: 14px; }
.doc-card h3 { font-size: 16px; margin: 18px 0 10px; }
.doc-card p, .doc-card li { font-size: 14px; color: var(--text-2); line-height: 1.8; }
.doc-card ol, .doc-card ul { padding-left: 20px; }
pre.code {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    font-size: 13px;
    overflow-x: auto;
    line-height: 1.7;
    font-family: Consolas, Menlo, monospace;
}
pre.code .c { color: #64748b; }

/* ===== 文章页（协议） ===== */
.article { max-width: 860px; margin: 30px auto; padding: 0 20px 60px; }
.article-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 40px; }
.article-card h1 { font-size: 24px; text-align: center; margin-bottom: 8px; }
.article-card .updated { text-align: center; color: var(--text-2); font-size: 13px; margin-bottom: 26px; }
.article-card h2 { font-size: 17px; margin: 22px 0 10px; }
.article-card p, .article-card li { font-size: 14px; color: var(--text-2); line-height: 1.9; }
.article-card ol, .article-card ul { padding-left: 22px; margin: 8px 0; }

/* ===== 提示 ===== */
.toast-box { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
    background: #1f2937;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    opacity: 0;
    transform: translateY(-8px);
    transition: all .25s;
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

.empty { text-align: center; color: var(--text-2); padding: 30px 0; font-size: 14px; }

/* ===== 响应式 ===== */
@media (max-width: 720px) {
    .nav { display: none; }
    .hero h1 { font-size: 30px; }
    .section { padding: 44px 0; }
}
