/* ============================================================
   墨韵文坊 · 网文任务接单平台
   书卷文人风格：墨黑 + 宣纸白 + 朱砂红 + 鎏金
   全站本地化，无任何远程 CDN 调用
   ============================================================ */

:root {
    --ink: #1a1a2e;
    --ink-2: #23233a;
    --ink-3: #2e2e4a;
    --paper: #f7f5f0;
    --paper-2: #efece4;
    --cinnabar: #c0392b;
    --cinnabar-dark: #a03024;
    --gold: #c9a063;
    --gold-light: #e0c08a;
    --text: #2b2b33;
    --text-2: #6b6b76;
    --line: #e3ded2;
    --white: #ffffff;
    --green: #2e7d5b;
    --gray: #9a9aa5;
    --radius: 10px;
    --shadow-sm: 0 2px 8px rgba(26, 26, 46, .06);
    --shadow-md: 0 8px 24px rgba(26, 26, 46, .10);
    --shadow-lg: 0 16px 48px rgba(26, 26, 46, .16);
    --font-serif: "Songti SC", "STSong", "STZhongsong", "SimSun", "Noto Serif CJK SC", serif;
    --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 700; color: var(--ink); }

::selection { background: var(--gold-light); color: var(--ink); }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 22px; border: 1px solid transparent; border-radius: var(--radius);
    font-size: 14px; font-family: var(--font-sans); cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
    white-space: nowrap; line-height: 1.4;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-primary { background: var(--cinnabar); color: #fff; }
.btn-primary:hover { background: var(--cinnabar-dark); }

.btn-outline { background: transparent; color: var(--paper); border-color: rgba(247, 245, 240, .5); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold-light); }

.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--line); }
.btn-ghost:hover { color: var(--ink); border-color: var(--gold); }

.btn-danger { background: transparent; color: var(--cinnabar); border-color: rgba(192, 57, 43, .35); }
.btn-danger:hover { background: var(--cinnabar); color: #fff; }

.btn-sm { padding: 5px 14px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 36px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }

/* ---------- 表单 ---------- */
label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 16px; }
input[type="text"], input[type="password"], input[type="number"], input[type="month"], select, textarea {
    display: block; width: 100%; margin-top: 6px;
    padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px;
    font-size: 14px; font-family: var(--font-sans); color: var(--text);
    background: var(--white); transition: border-color .18s ease, box-shadow .18s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 160, 99, .18);
}
textarea { resize: vertical; }

.alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 18px; }
.alert-success { background: #eaf5f0; color: var(--green); border: 1px solid #c8e6d8; }
.alert-error { background: #fbeae8; color: var(--cinnabar); border: 1px solid #f2cdc8; }
.alert-info { background: #eef0f8; color: var(--ink-3); border: 1px solid #d5daec; }

.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 8px; }
.form-actions.center { justify-content: center; }

/* ---------- 页头 ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(247, 245, 240, .92); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 8px;
    background: var(--cinnabar); color: #fff;
    font-family: var(--font-serif); font-size: 20px; font-weight: 700;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25);
}
.brand-name { font-family: var(--font-serif); font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: 2px; }
.site-nav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.site-nav > a:not(.btn):hover { color: var(--cinnabar); }
.nav-user { color: var(--gold); font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    background: linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 55%, #16213e 100%);
    color: var(--paper); padding: 110px 0 90px;
}
.hero-glow {
    position: absolute; width: 640px; height: 640px; border-radius: 50%;
    top: -220px; right: -120px; pointer-events: none;
    background: radial-gradient(circle, rgba(201, 160, 99, .22) 0%, rgba(201, 160, 99, 0) 65%);
}
.hero-inner { position: relative; z-index: 2; }
.hero-eyebrow {
    display: inline-block; font-size: 13px; letter-spacing: 4px;
    color: var(--gold); border: 1px solid rgba(201, 160, 99, .4);
    padding: 6px 18px; border-radius: 999px; margin-bottom: 28px;
}
.hero-title {
    font-size: 64px; line-height: 1.25; color: var(--paper);
    letter-spacing: 6px; margin-bottom: 24px;
}
.hero-sub { font-size: 16px; color: rgba(247, 245, 240, .72); margin-bottom: 40px; }
.hero-actions { display: flex; gap: 16px; margin-bottom: 64px; }
.hero-stats { display: flex; gap: 48px; border-top: 1px solid rgba(247, 245, 240, .14); padding-top: 32px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-serif); font-size: 22px; color: var(--gold-light); letter-spacing: 2px; }
.hero-stats span { font-size: 13px; color: rgba(247, 245, 240, .55); }
.hero-seal {
    position: absolute; right: 8%; bottom: 8%; z-index: 1;
    width: 150px; height: 150px; display: flex; align-items: center; justify-content: center;
    border: 3px solid rgba(192, 57, 43, .55); border-radius: 12px; transform: rotate(-8deg);
    font-family: var(--font-serif); font-size: 88px; color: rgba(192, 57, 43, .5);
    pointer-events: none; user-select: none;
}

/* 入场动画 */
.reveal { opacity: 0; transform: translateY(24px); animation: rise .8s ease forwards; }
.reveal:nth-child(1) { animation-delay: .05s; }
.reveal:nth-child(2) { animation-delay: .15s; }
.reveal:nth-child(3) { animation-delay: .25s; }
.reveal:nth-child(4) { animation-delay: .35s; }
.reveal:nth-child(5) { animation-delay: .45s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* ---------- 首页区块 ---------- */
.section { padding: 88px 0; }
.section-dark { background: var(--ink); color: var(--paper); }
.section-dark .section-title { color: var(--paper); }
.section-title { font-size: 34px; letter-spacing: 3px; text-align: center; margin-bottom: 14px; }
.section-sub { text-align: center; color: var(--text-2); max-width: 640px; margin: 0 auto 48px; }
.section-dark .section-sub { color: rgba(247, 245, 240, .6); }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
    background: var(--white); border: 1px solid var(--line); border-radius: 14px;
    padding: 36px 28px; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--gold); }
.feature-icon {
    width: 52px; height: 52px; border-radius: 12px; margin-bottom: 20px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(192, 57, 43, .1), rgba(201, 160, 99, .16));
    color: var(--cinnabar);
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-card h3 { font-size: 20px; letter-spacing: 2px; margin-bottom: 10px; }
.feature-card p { font-size: 14px; color: var(--text-2); }

.flow-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.flow-item {
    border: 1px solid rgba(247, 245, 240, .14); border-radius: 14px; padding: 30px 24px;
    transition: border-color .22s ease, transform .22s ease;
}
.flow-item:hover { border-color: var(--gold); transform: translateY(-4px); }
.flow-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%; margin-bottom: 16px;
    background: var(--cinnabar); color: #fff; font-family: var(--font-serif); font-size: 20px;
}
.flow-item h3 { color: var(--paper); font-size: 18px; letter-spacing: 2px; margin-bottom: 8px; }
.flow-item p { font-size: 13px; color: rgba(247, 245, 240, .6); }

.cta-section { background: var(--paper-2); }
.cta-inner { text-align: center; }
.cta-inner h2 { font-size: 30px; letter-spacing: 3px; margin-bottom: 12px; }
.cta-inner p { color: var(--text-2); margin-bottom: 28px; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--ink); color: rgba(247, 245, 240, .65); padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 40px; padding-bottom: 40px; }
.footer-brand .brand-name { color: var(--paper); }
.footer-brand p { margin-top: 14px; font-size: 13px; max-width: 320px; }
.footer-col h4 { color: var(--paper); font-size: 15px; letter-spacing: 2px; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 13px; margin-bottom: 8px; }
.footer-col a:hover { color: var(--gold-light); }
.footer-col p { font-size: 13px; }
.footer-bottom {
    display: flex; align-items: center; justify-content: center; gap: 20px;
    border-top: 1px solid rgba(247, 245, 240, .12); padding: 18px 0; font-size: 13px;
}
.footer-bottom a:hover { color: var(--gold-light); }

/* ---------- 登录/注册 ---------- */
.auth-main {
    min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center;
    padding: 48px 24px;
    background:
        radial-gradient(circle at 15% 20%, rgba(201, 160, 99, .10), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(192, 57, 43, .07), transparent 40%),
        var(--paper);
}
.auth-card {
    width: 100%; max-width: 420px; background: var(--white);
    border: 1px solid var(--line); border-radius: 16px; padding: 40px 36px;
    box-shadow: var(--shadow-md);
}
.auth-card.center { text-align: center; }
.auth-card h1 { font-size: 26px; letter-spacing: 3px; text-align: center; margin-bottom: 8px; }
.auth-sub { text-align: center; font-size: 13px; color: var(--text-2); margin-bottom: 28px; }
.auth-form .btn-block { margin-top: 6px; }
.auth-foot { text-align: center; font-size: 13px; color: var(--text-2); margin-top: 20px; }
.auth-foot a { color: var(--cinnabar); }
.auth-foot a:hover { text-decoration: underline; }

/* ---------- 作者工作台 ---------- */
.dash-main { min-height: calc(100vh - 64px); padding: 32px 0 64px; }
.dash-head { margin-bottom: 24px; }
.dash-head h1 { font-size: 28px; letter-spacing: 3px; }
.dash-head p { color: var(--text-2); font-size: 14px; }

.workbench { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }

.task-panel, .ai-panel {
    background: var(--white); border: 1px solid var(--line);
    border-radius: 14px; box-shadow: var(--shadow-sm); overflow: hidden;
}
.panel-title {
    display: flex; align-items: center; gap: 8px;
    padding: 14px 18px; font-family: var(--font-serif); font-weight: 700; letter-spacing: 2px;
    color: var(--ink); border-bottom: 1px solid var(--line); background: var(--paper-2);
}
.panel-title svg { width: 17px; height: 17px; color: var(--cinnabar); }

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

.task-list { list-style: none; max-height: 620px; overflow-y: auto; }
.task-item {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px; border-bottom: 1px solid var(--line);
    cursor: pointer; transition: background .15s ease;
}
.task-item:hover { background: #faf8f3; }
.task-item.active { background: #f6efe2; box-shadow: inset 3px 0 0 var(--gold); }
.task-item.is-done .task-name { color: var(--text-2); }

.task-check { margin: 2px 0 0; }
.task-check input { display: none; }
.checkbox-ui {
    display: inline-block; width: 18px; height: 18px; border-radius: 5px;
    border: 2px solid var(--line); background: var(--white); position: relative;
    transition: all .15s ease;
}
.task-check input:checked + .checkbox-ui { background: var(--cinnabar); border-color: var(--cinnabar); }
.task-check input:checked + .checkbox-ui::after {
    content: ""; position: absolute; left: 4px; top: 1px;
    width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.task-meta { flex: 1; min-width: 0; }
.task-name { display: block; font-weight: 600; font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-info { display: block; font-size: 12px; color: var(--text-2); margin-top: 2px; }
.task-type {
    display: inline-block; font-style: normal; font-size: 11px; color: var(--gold);
    border: 1px solid rgba(201, 160, 99, .45); border-radius: 4px; padding: 0 6px; margin-right: 6px;
}
.task-done-tag { display: block; font-size: 12px; color: var(--green); margin-top: 4px; }

/* AI 工作台 */
.ai-panel { display: flex; flex-direction: column; height: 720px; }
.ai-toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--paper-2);
    flex-wrap: wrap;
}
.ai-selects { display: flex; gap: 12px; }
.ai-selects label { margin: 0; font-size: 12px; }
.ai-selects select { margin-top: 2px; padding: 6px 10px; font-size: 13px; min-width: 170px; }
.ai-actions { display: flex; gap: 8px; }

.chat-box { flex: 1; overflow-y: auto; padding: 24px; background: #fbfaf7; }
.chat-empty { text-align: center; padding: 80px 20px; color: var(--text-2); font-size: 14px; }
.chat-empty-seal {
    width: 72px; height: 72px; margin: 0 auto 18px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid rgba(192, 57, 43, .4); border-radius: 10px; transform: rotate(-6deg);
    font-family: var(--font-serif); font-size: 38px; color: rgba(192, 57, 43, .45);
}

.msg { display: flex; margin-bottom: 16px; }
.msg-user { justify-content: flex-end; }
.msg-ai { align-items: flex-start; flex-direction: column; }
.msg-bubble {
    max-width: 78%; padding: 12px 16px; border-radius: 12px;
    font-size: 14px; line-height: 1.8; white-space: pre-wrap; word-break: break-word;
    box-shadow: var(--shadow-sm);
}
.msg-user .msg-bubble { background: #f4e9e4; color: var(--text); border: 1px solid #ead6cd; border-bottom-right-radius: 4px; }
.msg-ai .msg-bubble { background: #fff; color: var(--text); border: 1px solid #e5e0d6; border-bottom-left-radius: 4px; }
.msg-ai .msg-bubble.typing { color: var(--text-2); background: #f8f4ed; }
.msg-meta { font-size: 11px; color: var(--gray); margin-top: 4px; }
.msg-actions { margin: 8px 0 0 2px; }
.msg-copy-btn { padding: 6px 14px; border: 1px solid #d8c9af; border-radius: 7px; background: #fffaf0; color: #8b5f26; font: inherit; font-size: 12px; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.msg-copy-btn:hover { border-color: var(--gold); background: #fff3d7; }

.task-confirm-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; background: #fff8e8; border-top: 1px solid #eadbb5; border-bottom: 1px solid #eadbb5; }
.task-confirm-bar[hidden] { display: none; }
.task-confirm-bar strong { color: var(--ink); font-size: 14px; margin-right: 8px; }
.task-confirm-bar span { color: var(--text-2); font-size: 13px; }
.task-confirm-actions { display: flex; gap: 8px; flex-shrink: 0; }

.chat-input-bar {
    display: flex; gap: 10px; padding: 14px 16px;
    border-top: 1px solid var(--line); background: var(--white);
}
.chat-input-bar textarea { flex: 1; margin: 0; }
.chat-input-bar .btn { align-self: flex-end; }

/* ---------- 收入 ---------- */
.income-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 24px; }
.income-card {
    background: linear-gradient(135deg, var(--ink), var(--ink-3)); color: var(--paper);
    border-radius: 14px; padding: 26px 30px; box-shadow: var(--shadow-md);
}
.income-label { display: block; font-size: 13px; color: rgba(247, 245, 240, .6); margin-bottom: 6px; }
.income-num { font-family: var(--font-serif); font-size: 34px; color: var(--gold-light); }

/* ---------- 表格 ---------- */
.table-card {
    background: var(--white); border: 1px solid var(--line); border-radius: 14px;
    padding: 22px; box-shadow: var(--shadow-sm); margin-bottom: 24px; overflow-x: auto;
}
.card-title { font-size: 17px; letter-spacing: 2px; margin-bottom: 16px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
    text-align: left; font-weight: 600; color: var(--text-2); font-size: 12px;
    letter-spacing: 1px; padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap;
}
.data-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:hover td { background: #faf8f3; }
.table-empty { text-align: center; color: var(--text-2); padding: 36px 0 !important; }
.table-check { display: inline-flex; align-items: center; margin: 0; cursor: pointer; }
.table-check input { position: absolute; opacity: 0; pointer-events: none; }
.table-check span { width: 16px; height: 16px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); position: relative; }
.table-check input:checked + span { background: var(--cinnabar); border-color: var(--cinnabar); }
.table-check input:checked + span::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.task-list-head { margin-bottom: 16px; }
.task-list-head .card-title { margin: 0; }
.task-batch-actions { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-2); }
.assigned-authors-cell { min-width: 160px; }
.assignment-count { color: var(--text-2); font-size: 12px; margin-bottom: 5px; }
.assigned-author { display: flex; align-items: center; gap: 4px; color: var(--text); font-size: 12px; line-height: 1.7; white-space: nowrap; }
.assigned-author-id { color: var(--cinnabar); font-weight: 600; }
.assigned-author-account { color: var(--text-2); }
.money { color: var(--cinnabar); font-weight: 600; }
.url-cell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.prompt-cell { max-width: 320px; font-size: 13px; color: var(--text-2); }
.ops { white-space: nowrap; }
.ops .btn { margin-right: 6px; }
.inline-form { display: inline; }

.tag {
    display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 999px;
    background: var(--paper-2); color: var(--text-2); border: 1px solid var(--line);
}
.tag-red { background: #fbeae8; color: var(--cinnabar); border-color: #f2cdc8; }
.tag-green { background: #eaf5f0; color: var(--green); border-color: #c8e6d8; }
.tag-gray { background: #f0f0f2; color: var(--gray); }

/* ---------- 管理后台 ---------- */
.admin-body { background: var(--paper); }
.admin-layout { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.admin-sidebar {
    background: var(--ink); color: rgba(247, 245, 240, .75);
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.admin-brand { padding: 20px; border-bottom: 1px solid rgba(247, 245, 240, .1); }
.admin-brand .brand-name { color: var(--paper); font-size: 18px; }
.admin-nav { flex: 1; padding: 16px 12px; }
.admin-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px; border-radius: 9px; font-size: 14px; margin-bottom: 4px;
    transition: background .15s ease, color .15s ease;
}
.admin-nav a svg { width: 17px; height: 17px; }
.admin-nav a:hover { background: rgba(247, 245, 240, .08); color: var(--paper); }
.admin-nav a.on { background: var(--cinnabar); color: #fff; }
.admin-side-foot { padding: 16px 20px; border-top: 1px solid rgba(247, 245, 240, .1); font-size: 13px; display: flex; justify-content: space-between; }
.admin-side-foot a:hover { color: var(--gold-light); }

.admin-content { min-width: 0; }
.admin-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 32px; background: var(--white); border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 10;
}
.admin-topbar h1 { font-size: 20px; letter-spacing: 2px; }
.admin-main { padding: 28px 32px 56px; }

.section-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-tip { font-size: 13px; color: var(--text-2); }
.form-card { max-width: 860px; }
.admin-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.admin-form .form-row:has(> label:only-child) { grid-template-columns: 1fr; }
.check-label { margin-bottom: 8px; }
.author-checks {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px;
    border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 16px;
    max-height: 220px; overflow-y: auto; background: var(--white);
}
.author-check {
    display: flex; align-items: center; gap: 8px; margin: 0;
    font-size: 13px; color: var(--text); cursor: pointer; padding: 6px 8px; border-radius: 6px;
}
.author-check:hover { background: var(--paper-2); }
.author-check input { accent-color: var(--cinnabar); width: 15px; height: 15px; }

/* ---------- 模态框 ---------- */
.modal {
    display: none; position: fixed; inset: 0; z-index: 100;
    background: rgba(26, 26, 46, .5); backdrop-filter: blur(3px);
    align-items: center; justify-content: center; padding: 24px;
}
.modal.open { display: flex; }
.modal-card {
    width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto;
    background: var(--white); border-radius: 16px; padding: 28px;
    box-shadow: var(--shadow-lg); animation: modalIn .22s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-card h3 { font-size: 18px; letter-spacing: 2px; margin-bottom: 18px; }
.modal-tip { font-size: 13px; color: var(--text-2); margin-bottom: 14px; }

/* ---------- 安装向导 ---------- */
.install-body {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background:
        radial-gradient(circle at 20% 15%, rgba(201, 160, 99, .14), transparent 45%),
        radial-gradient(circle at 80% 85%, rgba(192, 57, 43, .10), transparent 45%),
        var(--ink);
    padding: 40px 20px;
}
.install-wrap { width: 100%; max-width: 560px; }
.install-card {
    background: var(--paper); border-radius: 18px; padding: 40px 38px;
    box-shadow: var(--shadow-lg);
}
.install-head { text-align: center; margin-bottom: 28px; }
.install-head .brand-mark { width: 52px; height: 52px; font-size: 28px; border-radius: 12px; margin-bottom: 14px; }
.install-head h1 { font-size: 21px; letter-spacing: 2px; margin-bottom: 18px; }
.install-steps { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.install-steps span {
    font-size: 12px; color: var(--text-2); padding: 4px 12px;
    border: 1px solid var(--line); border-radius: 999px; background: var(--white);
}
.install-steps span.on { background: var(--cinnabar); border-color: var(--cinnabar); color: #fff; }
.install-confirm ul { margin: 14px 0 22px 20px; font-size: 14px; color: var(--text-2); }
.install-confirm li { margin-bottom: 6px; }
.install-done { text-align: center; padding: 12px 0; }
.done-icon {
    width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%;
    background: #eaf5f0; color: var(--green); display: flex; align-items: center; justify-content: center;
}
.done-icon svg { width: 30px; height: 30px; }
.install-done h2 { font-size: 22px; letter-spacing: 3px; margin-bottom: 10px; }
.install-done p { font-size: 14px; color: var(--text-2); margin-bottom: 24px; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
    .hero-title { font-size: 42px; }
    .card-grid { grid-template-columns: 1fr; }
    .flow-grid { grid-template-columns: repeat(2, 1fr); }
    .workbench { grid-template-columns: 1fr; }
    .ai-panel { height: 600px; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; height: auto; }
    .admin-nav { display: flex; flex-wrap: wrap; }
    .footer-grid { grid-template-columns: 1fr; }
    .income-summary { grid-template-columns: 1fr; }
    .admin-form .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .hero { padding: 72px 0 60px; }
    .hero-title { font-size: 34px; letter-spacing: 3px; }
    .hero-stats { gap: 24px; flex-wrap: wrap; }
    .hero-seal { display: none; }
    .flow-grid { grid-template-columns: 1fr; }
    .section { padding: 56px 0; }
    .site-nav { gap: 12px; }
    .admin-main { padding: 20px 16px 48px; }
    .ai-selects { flex-wrap: wrap; }
    .task-confirm-bar { align-items: flex-start; flex-direction: column; }
    .task-confirm-actions { width: 100%; }
    .task-confirm-actions .btn { flex: 1; }
}
