/* =========================================================
   接单中心 · 样式表
   ========================================================= */

:root {
    --bg: #f6f7fb;
    --panel: #ffffff;
    --line: #e9ebf1;
    --line-2: #dde1ea;
    --text: #12141c;
    --text-2: #4c5266;
    --muted: #8a90a3;
    --brand: #3f5bf6;
    --brand-2: #7a5cf7;
    --brand-ink: #2b3ccc;
    --brand-soft: #eef1ff;
    --ok: #10b981;
    --warn: #f59e0b;
    --danger: #ef4444;
    --radius: 14px;
    --shadow-sm: 0 1px 2px rgba(16, 18, 28, .05);
    --shadow: 0 14px 40px -18px rgba(16, 18, 28, .28);
    --side-w: 306px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.app-body { overflow: hidden; }

a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.015em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: rgba(63, 91, 246, .18); }

/* 滚动条 */
.msgs::-webkit-scrollbar, .threads::-webkit-scrollbar { width: 8px; }
.msgs::-webkit-scrollbar-thumb, .threads::-webkit-scrollbar-thumb {
    background: #d8dce6; border-radius: 8px; border: 2px solid transparent; background-clip: content-box;
}
.msgs::-webkit-scrollbar-track, .threads::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 按钮 ---------------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 16px; border-radius: 10px;
    font-size: 14px; font-weight: 600; line-height: 1;
    border: 1px solid transparent; cursor: pointer; white-space: nowrap;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    box-shadow: 0 10px 22px -12px rgba(63, 91, 246, .9);
}
.btn-primary:hover { box-shadow: 0 14px 26px -12px rgba(63, 91, 246, 1); transform: translateY(-1px); }

.btn-line { background: #fff; border-color: var(--line-2); color: var(--text); }
.btn-line:hover { border-color: #c9cfe0; background: #fbfbfe; }

.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: rgba(18, 20, 28, .05); color: var(--text); }

.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------------- 品牌 ---------------- */

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand-mark {
    width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff; font-weight: 700; font-size: 16px;
    box-shadow: 0 8px 18px -10px rgba(63, 91, 246, .9);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 15px; letter-spacing: .01em; }
.brand-text i { font-style: normal; font-size: 9.5px; letter-spacing: .18em; color: var(--muted); }
.brand.small .brand-mark { width: 30px; height: 30px; border-radius: 9px; font-size: 14px; }
.brand.small .brand-text b { font-size: 14px; }
.brand.light { color: #fff; }
.brand.light .brand-text i { color: rgba(255, 255, 255, .5); }

/* ---------------- 首页 ---------------- */

.site-head {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; gap: 28px;
    height: 68px; padding: 0 40px;
    background: rgba(255, 255, 255, .78);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(233, 235, 241, .9);
}
.site-nav { display: flex; gap: 4px; margin-left: 12px; }
.site-nav a {
    padding: 8px 12px; border-radius: 8px; font-size: 14px; color: var(--text-2); font-weight: 500;
}
.site-nav a:hover { background: rgba(18, 20, 28, .05); color: var(--text); }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.landing { max-width: 1140px; margin: 0 auto; padding: 0 28px; }

.hero {
    position: relative;
    display: grid; grid-template-columns: 1.06fr .94fr; gap: 56px; align-items: center;
    padding: 64px 0 60px;
}
.hero::before {
    content: ""; position: absolute; z-index: -1; top: -160px; right: -160px;
    width: 620px; height: 620px; border-radius: 50%;
    background: radial-gradient(circle, rgba(122, 92, 247, .16), rgba(63, 91, 246, .04) 55%, transparent 70%);
    filter: blur(6px);
}

.pill {
    display: inline-flex; align-items: center; gap: 8px;
    height: 30px; padding: 0 12px; border-radius: 999px;
    background: #fff; border: 1px solid var(--line);
    font-size: 12.5px; color: var(--text-2); box-shadow: var(--shadow-sm);
}
.dot {
    width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, .14);
    animation: pulse 2.4s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, .14); }
    50% { box-shadow: 0 0 0 7px rgba(16, 185, 129, .04); }
}

.hero h1 {
    margin: 18px 0 0;
    font-size: clamp(30px, 4vw, 50px);
    line-height: 1.16; letter-spacing: -.03em; font-weight: 800;
}
.hero h1 em {
    font-style: normal;
    background: linear-gradient(120deg, var(--brand), var(--brand-2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lede { margin-top: 18px; font-size: 16px; line-height: 1.75; color: var(--text-2); max-width: 30em; }
.hero-cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

.hero-stats { display: flex; gap: 36px; margin-top: 38px; }
.hero-stats li { display: flex; flex-direction: column; gap: 2px; }
.hero-stats b { font-size: 22px; letter-spacing: -.02em; }
.hero-stats span { font-size: 12.5px; color: var(--muted); }

.hero-trust { display: flex; gap: 22px; margin-top: 34px; flex-wrap: wrap; }
.hero-trust li { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); }
.hero-trust i {
    width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(16, 185, 129, .12); color: var(--ok); font-style: normal; font-size: 10px; font-weight: 700;
}

/* 首页聊天预览 */
.hero-visual { display: flex; justify-content: center; }
.demo-card {
    width: 100%; max-width: 420px;
    background: #fff; border: 1px solid var(--line); border-radius: 20px;
    box-shadow: 0 40px 80px -40px rgba(18, 20, 44, .38), 0 2px 8px rgba(18, 20, 44, .04);
    transform: rotate(-1.4deg);
    overflow: hidden;
}
.demo-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.demo-name { display: flex; flex-direction: column; line-height: 1.3; }
.demo-name b { font-size: 13.5px; }
.demo-name i { font-style: normal; font-size: 11.5px; color: var(--ok); display: flex; align-items: center; }
.demo-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; background: #fafbfe; }
.demo-msg {
    max-width: 86%; padding: 9px 12px; border-radius: 13px; font-size: 13px; line-height: 1.6;
    background: #fff; border: 1px solid var(--line);
}
.demo-msg.them { border-bottom-left-radius: 4px; }
.demo-msg.me {
    margin-left: auto; background: linear-gradient(135deg, #4a63f8, #6f55f6);
    color: #fff; border-color: transparent; border-bottom-right-radius: 4px;
}
.demo-msg.attach { display: flex; align-items: center; gap: 10px; width: 86%; }
.mini-file { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text); }
.mini-file svg { color: var(--brand); }
.mini-size { font-size: 11px; color: var(--muted); margin-left: auto; }
.demo-foot { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line); }
.attach-chip {
    font-size: 11.5px; color: var(--text-2); background: #f4f5fa; border-radius: 6px; padding: 4px 8px;
}

/* 首页区块 */
.section { padding: 60px 0; border-top: 1px solid var(--line); }
.sec-kicker { font-size: 11px; letter-spacing: .22em; color: var(--brand); font-weight: 700; margin-bottom: 10px; }
.section h2 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.025em; }
.sec-sub { margin-top: 8px; color: var(--text-2); font-size: 14.5px; }

.grid-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.card {
    background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d9def0; }
.card-ico {
    width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand); margin-bottom: 14px;
}
.card-ico svg { width: 21px; height: 21px; }
.card h3 { font-size: 15.5px; margin-bottom: 7px; }
.card p { font-size: 13.5px; line-height: 1.7; color: var(--text-2); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 28px; }
.step { padding: 20px; border-radius: 16px; background: #fff; border: 1px solid var(--line); position: relative; }
.step span { font-size: 12px; font-weight: 700; color: var(--brand); letter-spacing: .06em; }
.step h4 { font-size: 14.5px; margin: 10px 0 6px; }
.step p { font-size: 13px; line-height: 1.65; color: var(--text-2); }

.faq { margin-top: 24px; display: grid; gap: 10px; max-width: 780px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; }
.faq summary {
    cursor: pointer; padding: 15px 0; font-size: 14.5px; font-weight: 600; list-style: none;
    display: flex; align-items: center; justify-content: space-between;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 18px; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 16px; font-size: 13.5px; line-height: 1.75; color: var(--text-2); }

.cta-band {
    margin: 60px 0 72px; padding: 38px 40px; border-radius: 22px;
    background: linear-gradient(120deg, #171a33, #242a5c 55%, #3a2f78);
    color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px;
    position: relative; overflow: hidden;
}
.cta-band::after {
    content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px;
    border-radius: 50%; background: radial-gradient(circle, rgba(122, 92, 247, .55), transparent 65%);
}
.cta-band h2 { font-size: 24px; letter-spacing: -.02em; }
.cta-band p { margin-top: 8px; font-size: 14px; color: rgba(255, 255, 255, .72); }
.cta-band .btn { position: relative; z-index: 1; background: #fff; color: #1a1d33; box-shadow: none; }
.cta-band .btn:hover { transform: translateY(-1px); }

.site-foot { border-top: 1px solid var(--line); background: #fff; }
.foot-inner {
    max-width: 1140px; margin: 0 auto; padding: 32px 28px;
    display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
    font-size: 13px; color: var(--text-2);
}
.foot-inner .muted { color: var(--muted); margin-left: auto; }

/* ---------------- 登录 / 注册 ---------------- */

.auth-wrap { display: grid; grid-template-columns: minmax(360px, 44%) 1fr; min-height: 100vh; }
.auth-aside {
    position: relative; overflow: hidden; padding: 40px;
    background: linear-gradient(160deg, #101223 0%, #171c3d 55%, #2a2160 100%);
    color: #fff; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-aside::before {
    content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%;
    right: -220px; bottom: -180px;
    background: radial-gradient(circle, rgba(122, 92, 247, .55), transparent 62%);
}
.auth-aside::after {
    content: ""; position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at 30% 20%, #000 10%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse at 30% 20%, #000 10%, transparent 72%);
}
.auth-aside > * { position: relative; z-index: 1; }
.auth-pitch h2 { font-size: clamp(24px, 2.4vw, 34px); line-height: 1.35; letter-spacing: -.025em; }
.auth-pitch ul { margin-top: 26px; display: grid; gap: 14px; }
.auth-pitch li { display: flex; gap: 10px; align-items: center; font-size: 14px; color: rgba(255, 255, 255, .82); }
.auth-pitch li span { color: #8f7bff; font-size: 10px; }
.auth-note { font-size: 12.5px; color: rgba(255, 255, 255, .45); }

.auth-main { display: grid; place-items: center; padding: 40px 24px; position: relative; }
.auth-card { width: 100%; max-width: 396px; }
.auth-tabs {
    display: inline-flex; padding: 4px; background: #eceef5; border-radius: 11px; margin-bottom: 26px;
}
.auth-tabs a {
    padding: 7px 20px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--text-2);
}
.auth-tabs a.on { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }
.auth-card h1 { font-size: 26px; letter-spacing: -.02em; }
.auth-sub { margin-top: 8px; font-size: 13.5px; color: var(--muted); }

.form { margin-top: 22px; display: grid; gap: 14px; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field > span em { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 4px; }
.field input, .field textarea, .modal-card textarea {
    width: 100%; height: 42px; padding: 0 13px; border-radius: 10px;
    border: 1px solid var(--line-2); background: #fff; font-size: 14px; color: var(--text);
    font-family: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field textarea, .modal-card textarea { height: auto; padding: 10px 13px; line-height: 1.6; resize: vertical; }
.field input:focus, .field textarea:focus, .modal-card textarea:focus {
    border-color: #a9b4f2; box-shadow: 0 0 0 4px rgba(63, 91, 246, .1);
}
.field input::placeholder, textarea::placeholder { color: #b3b8c8; }

.pwd { position: relative; }
.pwd input { padding-right: 42px; }
.pwd-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 32px; height: 32px; border: 0; background: none; border-radius: 8px;
    color: var(--muted); cursor: pointer; display: grid; place-items: center;
}
.pwd-toggle:hover { background: #f2f4f9; color: var(--text-2); }

.form-alert {
    font-size: 12.5px; color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca;
    border-radius: 9px; padding: 9px 12px; line-height: 1.5;
}
.form-tip { font-size: 12.5px; color: var(--muted); text-align: center; line-height: 1.6; }
.form-tip a { font-weight: 600; }
.back-home { position: absolute; left: 24px; top: 24px; font-size: 13px; color: var(--muted); }
.back-home:hover { color: var(--text); }

/* ---------------- 应用外壳 ---------------- */

.app { display: grid; grid-template-columns: var(--side-w) 1fr; height: 100vh; height: 100dvh; overflow: hidden; }

.side {
    display: flex; flex-direction: column; min-height: 0;
    background: #fff; border-right: 1px solid var(--line);
}
.side-top {
    height: 62px; flex: 0 0 62px; display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px; border-bottom: 1px solid var(--line);
}
.mobile-close, .mobile-menu { display: none; border: 0; background: none; color: var(--text-2); cursor: pointer; padding: 6px; border-radius: 8px; }
.mobile-close:hover, .mobile-menu:hover { background: #f2f4f9; }

.avatar {
    width: 36px; height: 36px; flex: 0 0 auto; border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff; display: grid; place-items: center;
    font-weight: 700; font-size: 15px; user-select: none;
}
.avatar.lg { width: 44px; height: 44px; border-radius: 14px; font-size: 17px; }
.avatar.sm { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; }
.avatar.gray { background: linear-gradient(135deg, #c9cede, #aeb5c9); }

.peer-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.35; }
.peer-meta b { font-size: 14px; font-weight: 650; }
.peer-meta i { font-style: normal; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.online-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); display: inline-block; }

.side-card {
    margin: 14px; padding: 14px; border-radius: 14px;
    background: linear-gradient(180deg, #f7f8ff, #fff);
    border: 1px solid var(--line);
}
.side-card .peer { display: flex; gap: 10px; align-items: center; }
.side-hint { margin-top: 11px; font-size: 12.5px; line-height: 1.7; color: var(--text-2); }
.side-tags { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.side-tags span { font-size: 11.5px; color: var(--brand-ink); background: var(--brand-soft); border-radius: 6px; padding: 3px 7px; }

.side-nav { padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .side-nav button {
    display: flex; align-items: center; gap: 10px; width: 100%;
    height: 40px; padding: 0 11px; border: 0; border-radius: 10px;
    background: none; color: var(--text-2); font-size: 13.5px; text-align: left; cursor: pointer;
    transition: background .14s, color .14s;
}
.side-nav a:hover, .side-nav button:hover { background: #f4f5fa; color: var(--text); }
.side-nav a.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 650; }
.side-nav svg { width: 18px; height: 18px; flex: 0 0 18px; }
.side-nav form { margin: 0; }

.badge {
    margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px; background: var(--danger); color: #fff;
    font-size: 11px; font-weight: 600; display: grid; place-items: center;
}

.side-user {
    margin-top: auto; padding: 12px 14px; border-top: 1px solid var(--line);
    display: flex; align-items: center; gap: 10px;
}
.inline-form { margin-left: auto; }

/* ---------------- 聊天区 ---------------- */

.chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #f6f7fb; }

.chat-head {
    height: 62px; flex: 0 0 62px; display: flex; align-items: center; gap: 12px;
    padding: 0 18px; background: #fff; border-bottom: 1px solid var(--line);
}
.chat-peer { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat-head-actions { margin-left: auto; }
.enc-tag {
    display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ok);
    background: rgba(16, 185, 129, .09); border-radius: 7px; padding: 4px 8px;
}

.msgs { flex: 1 1 auto; overflow-y: auto; padding: 20px 20px 6px; overscroll-behavior: contain; }

.msg { display: flex; flex-direction: column; gap: 6px; margin: 9px 0; max-width: min(680px, 80%); }
.msg.mine { margin-left: auto; align-items: flex-end; }
.msg.theirs { margin-right: auto; align-items: flex-start; }
.msg-main { display: flex; flex-direction: column; gap: 8px; }
.msg.mine .msg-main { align-items: flex-end; }
.msg.theirs .msg-main { align-items: flex-start; }

.bubble {
    padding: 10px 13px; border-radius: 14px;
    background: #fff; border: 1px solid var(--line);
    font-size: 14.5px; line-height: 1.66; color: var(--text);
    white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
    box-shadow: var(--shadow-sm);
}
.msg.theirs .bubble { border-bottom-left-radius: 5px; }
.msg.mine .bubble {
    background: linear-gradient(135deg, #4a63f8, #6f55f6);
    border-color: transparent; color: #fff; border-bottom-right-radius: 5px;
    box-shadow: 0 8px 18px -12px rgba(63, 91, 246, .9);
}
.bubble a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.msg.mine .bubble a { color: #fff; }

.msg-time { font-size: 11px; color: var(--muted); padding: 0 4px; }
.msg.mine .msg-time { text-align: right; }

.msg-files { display: flex; flex-direction: column; gap: 8px; }
.msg.mine .msg-files { align-items: flex-end; }
.msg.theirs .msg-files { align-items: flex-start; }

.f-img { display: block; line-height: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.f-img img { max-width: 250px; max-height: 250px; object-fit: cover; display: block; cursor: zoom-in; }
.f-audio { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 5px 10px 5px 6px; }
.f-audio audio { height: 34px; max-width: 260px; display: block; }
.f-video { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.f-video video { max-width: 280px; max-height: 260px; display: block; }

.f-file {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px;
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    min-width: 210px; max-width: 290px; color: var(--text);
    transition: border-color .14s, box-shadow .14s;
}
.f-file:hover { border-color: #c4cdf5; box-shadow: 0 6px 16px -10px rgba(18, 20, 44, .3); }
.f-ico {
    width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand);
}
.f-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.f-meta b { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; }
.f-meta i { font-style: normal; font-size: 11px; color: var(--muted); }
.f-dl { margin-left: auto; color: var(--muted); display: grid; place-items: center; }
.f-file:hover .f-dl { color: var(--brand); }

.sys-note {
    align-self: center; margin: 10px auto; font-size: 11.5px; color: var(--muted);
    background: rgba(18, 20, 28, .045); border-radius: 7px; padding: 4px 10px;
}

.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.empty-ico {
    width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
    background: #fff; border: 1px solid var(--line); color: #c3c8d6;
}
.empty-ico svg { width: 26px; height: 26px; }
.empty p { font-size: 13.5px; }

/* ---------------- 输入区 ---------------- */

.composer { padding: 10px 18px 14px; background: linear-gradient(180deg, rgba(246, 247, 251, 0), #f6f7fb 22%); }
.composer-box {
    background: #fff; border: 1px solid var(--line-2); border-radius: 16px;
    padding: 9px 10px 7px; transition: border-color .15s, box-shadow .15s;
}
.composer-box:focus-within { border-color: #aab5f3; box-shadow: 0 0 0 4px rgba(63, 91, 246, .08); }
.composer-box.drag { border-color: var(--brand); background: #f7f8ff; }
.composer-box textarea {
    width: 100%; border: 0; outline: none; resize: none; background: none;
    font-family: inherit; font-size: 14.5px; line-height: 1.62; color: var(--text);
    max-height: 180px; padding: 3px 3px 0;
}
.composer-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 5px; }
.composer-tools { display: flex; gap: 2px; }
.composer-right { display: flex; align-items: center; gap: 10px; }
.kbd-hint { font-size: 11px; color: #b3b8c8; }

.icon-btn {
    width: 34px; height: 34px; border: 0; border-radius: 9px; background: none;
    color: var(--muted); display: grid; place-items: center; cursor: pointer;
    transition: background .14s, color .14s;
}
.icon-btn:hover { background: #f1f3f9; color: var(--text); }
.icon-btn.rec { background: #fef2f2; color: var(--danger); animation: pulse-rec 1.2s infinite; }
@keyframes pulse-rec { 50% { box-shadow: 0 0 0 5px rgba(239, 68, 68, .12); } }

.send-btn {
    display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
    border: 0; border-radius: 9px; cursor: pointer;
    background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
    font-size: 13px; font-weight: 650;
    box-shadow: 0 8px 16px -10px rgba(63, 91, 246, .95);
    transition: opacity .15s, transform .15s;
}
.send-btn:hover { transform: translateY(-1px); }
.send-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.composer-hint { margin-top: 7px; font-size: 11px; color: #b3b8c8; text-align: center; }

.tray { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 2px 9px; }
.chip {
    display: flex; align-items: center; gap: 8px; padding: 6px 8px;
    background: #fff; border: 1px solid var(--line); border-radius: 10px;
    font-size: 12px; max-width: 230px;
}
.chip img { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; }
.chip .c-ico { width: 32px; height: 32px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.chip .c-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.chip .c-size { color: var(--muted); font-size: 11px; }
.chip button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px; border-radius: 5px; display: grid; place-items: center; }
.chip button:hover { background: #f2f4f9; color: var(--danger); }

.drop-mask {
    position: fixed; inset: 0; z-index: 60; display: none;
    background: rgba(63, 91, 246, .1); backdrop-filter: blur(2px);
    align-items: center; justify-content: center;
}
.drop-mask.on { display: flex; }
.drop-mask div {
    padding: 22px 30px; border-radius: 16px; background: #fff; border: 2px dashed var(--brand);
    color: var(--brand); font-weight: 650; font-size: 15px;
}

/* ---------------- 管理端列表 ---------------- */

.search {
    margin: 12px 14px 8px; display: flex; align-items: center; gap: 8px;
    height: 36px; padding: 0 10px; border-radius: 10px;
    background: #f4f5fa; color: var(--muted);
}
.search input { flex: 1; border: 0; background: none; outline: none; font-size: 13px; color: var(--text); min-width: 0; }

.seg { display: flex; gap: 5px; padding: 0 14px 9px; }
.seg button {
    flex: 1; height: 30px; border: 1px solid transparent; border-radius: 8px;
    background: #f4f5fa; color: var(--text-2); font-size: 12px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.seg button.on { background: #fff; border-color: var(--line-2); color: var(--text); font-weight: 650; box-shadow: var(--shadow-sm); }
.seg em { font-style: normal; font-size: 10.5px; color: var(--muted); }

.threads { flex: 1 1 auto; overflow-y: auto; padding: 0 8px 10px; min-height: 0; }
.thread {
    display: flex; gap: 10px; padding: 10px; border-radius: 12px; color: inherit;
    transition: background .13s;
}
.thread:hover { background: #f5f6fb; }
.thread.on { background: var(--brand-soft); }
.thread-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.thread-top { display: flex; align-items: center; gap: 6px; }
.thread-top b { font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-top time { margin-left: auto; font-size: 10.5px; color: var(--muted); flex: 0 0 auto; }
.thread-sub { display: flex; align-items: center; gap: 6px; min-width: 0; }
.thread-sub span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.thread .badge { margin-left: auto; flex: 0 0 auto; }
.thread.on .thread-sub span { color: #5d6bbb; }

.st-dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 6px; }
.st-new { background: var(--warn); }
.st-active { background: var(--brand); }
.st-done { background: var(--ok); }

.thread-skeleton { padding: 8px; display: grid; gap: 10px; }
.thread-skeleton span { display: block; height: 46px; border-radius: 10px; background: linear-gradient(90deg, #f2f3f8, #f8f9fc, #f2f3f8); background-size: 200% 100%; animation: sk 1.3s infinite; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.admin-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding: 9px 18px; background: #fff; border-bottom: 1px solid var(--line);
    font-size: 12px; color: var(--text-2);
}
.meta-chip { background: #f4f5fa; border-radius: 7px; padding: 4px 9px; display: inline-flex; align-items: center; gap: 5px; }
.meta-chip b { font-weight: 600; color: var(--text); }
.admin-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.mini-select {
    height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff;
    font-size: 12.5px; color: var(--text); padding: 0 8px; cursor: pointer; outline: none; font-family: inherit;
}
.mini-select:focus { border-color: #aab5f3; }

/* ---------------- 弹窗 / 灯箱 ---------------- */

.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(14, 17, 32, .38); backdrop-filter: blur(3px); padding: 20px; }
.modal-card {
    width: 100%; max-width: 400px; background: #fff; border-radius: 16px;
    padding: 22px; box-shadow: 0 30px 70px -30px rgba(10, 12, 30, .5);
    animation: pop .16s ease-out;
}
@keyframes pop { from { transform: scale(.97); opacity: .6; } }
.modal-card h3 { font-size: 16px; }
.modal-sub { margin-top: 6px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

.lightbox {
    position: fixed; inset: 0; z-index: 80; background: rgba(8, 10, 20, .9);
    display: grid; place-items: center; padding: 24px; cursor: zoom-out;
}
.lightbox img { max-width: 94vw; max-height: 92vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }

.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.error-card .error-code { font-size: 60px; font-weight: 800; color: #dfe3ee; letter-spacing: -.04em; }
.error-card h1 { font-size: 22px; margin: 6px 0 10px; }
.error-card p { color: var(--muted); font-size: 14px; margin-bottom: 22px; }

/* 轻提示 */
.toast {
    position: fixed; left: 50%; bottom: 34px; z-index: 90;
    transform: translateX(-50%) translateY(6px);
    background: #1b1e30; color: #fff; font-size: 13px;
    padding: 10px 16px; border-radius: 10px; max-width: 78vw;
    box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .6);
    opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 加载更早消息 */
.load-more {
    align-self: center; margin: 4px auto 12px;
    border: 1px solid var(--line-2); background: #fff; color: var(--text-2);
    font-size: 12px; padding: 6px 14px; border-radius: 999px; cursor: pointer;
}
.load-more:hover { border-color: #c6cee8; color: var(--text); }

.thread-empty { text-align: center; padding: 40px 10px; font-size: 12.5px; color: var(--muted); }

/* ---------------- 响应式 ---------------- */

@media (max-width: 1000px) {
    .hero { grid-template-columns: 1fr; gap: 40px; padding: 44px 0 40px; }
    .hero-visual { justify-content: flex-start; }
    .demo-card { transform: none; max-width: 440px; }
    .grid-cards { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .site-nav { display: none; }
}

@media (max-width: 860px) {
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .auth-card { max-width: 420px; }

    .app { grid-template-columns: 1fr; }
    .side {
        position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; width: 86vw; max-width: 330px;
        transform: translateX(-101%); transition: transform .2s ease;
        box-shadow: 0 0 60px rgba(10, 12, 30, .2);
    }
    .side.open { transform: none; }
    .mobile-menu, .mobile-close { display: grid; place-items: center; }
    .msg { max-width: 88%; }
    .composer { padding: 8px 12px 10px; }
    .msgs { padding: 14px 12px 4px; }
    .chat-head { padding: 0 12px; }
    .admin-meta { padding: 8px 12px; }
    .kbd-hint { display: none; }
}

@media (max-width: 640px) {
    .site-head { padding: 0 18px; height: 60px; gap: 12px; }
    .head-actions .btn-ghost { display: none; }
    .landing { padding: 0 18px; }
    .hero-stats { gap: 26px; }
    .grid-cards, .steps { grid-template-columns: 1fr; }
    .cta-band { flex-direction: column; align-items: flex-start; padding: 28px; margin: 40px 0 48px; }
    .foot-inner { padding: 24px 18px; }
    .foot-inner .muted { margin-left: 0; }
    .enc-tag { display: none; }
    .f-img img { max-width: 200px; max-height: 200px; }
    .section { padding: 44px 0; }
}

.empty-sub { font-size: 12px; color: #b3b8c8; margin-top: -4px; }
