/*
 * 小景法律助理 · 法律问答组件与游客页面样式
 * 游客页（guest.html）与系统内「法律问答」「公益咨询」页共用。色板沿用 v5「卷宗」：黛青主色、朱砂只给紧急事项。
 */
:root {
    --lqa-primary: var(--primary, #1E3A47);
    --lqa-primary-soft: #E3EBEE;
    --lqa-danger: var(--danger, #B8322A);
    --lqa-warn: #A86A12;
    --lqa-ok: #2F7D5B;
    --lqa-text: #1B1F23;
    --lqa-muted: #6B757C;
    --lqa-line: #E1E5E8;
    --lqa-bg: #F3F5F5;
}

/* ===== 问答组件 ===== */
.lqa { display: flex; flex-direction: column; gap: 12px; max-width: 860px; margin: 0 auto; width: 100%; }
.lqa-list { display: flex; flex-direction: column; gap: 14px; }
.lqa-empty { color: var(--lqa-muted); text-align: center; padding: 28px 12px 8px; font-size: 14px; line-height: 1.8; }
.lqa-quick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.lqa-chip { border: 1px solid var(--lqa-line); background: #fff; color: var(--lqa-primary); border-radius: 16px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.lqa-chip:hover { border-color: var(--lqa-primary); }
.lqa-user { align-self: flex-end; max-width: 80%; background: var(--lqa-primary); color: #fff; padding: 10px 14px; border-radius: 14px 14px 4px 14px; font-size: 15px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.lqa-card { align-self: stretch; background: #fff; border: 1px solid var(--lqa-line); border-radius: 10px; padding: 16px 18px; font-size: 15px; line-height: 1.8; color: var(--lqa-text); }
.lqa-plain { color: var(--lqa-text); }
.lqa-sec + .lqa-sec { margin-top: 12px; }
.lqa-h { font-size: 13px; font-weight: 700; color: var(--lqa-primary); letter-spacing: 1px; margin-bottom: 4px; }
.lqa-conclusion { font-size: 16px; font-weight: 600; }
.lqa-basis { border-left: 3px solid var(--lqa-primary-soft); padding: 2px 0 2px 10px; margin: 6px 0; }
.lqa-basis-head { display: flex; gap: 8px; align-items: baseline; cursor: pointer; background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; width: 100%; }
.lqa-basis-label { color: var(--lqa-primary); font-weight: 600; white-space: nowrap; }
.lqa-basis-note { color: var(--lqa-muted); font-size: 14px; flex: 1; }
.lqa-basis-toggle { color: var(--lqa-muted); font-size: 12px; white-space: nowrap; }
.lqa-basis-body { display: none; margin-top: 6px; font-size: 14px; color: #33393E; background: var(--lqa-bg); border-radius: 6px; padding: 8px 10px; white-space: pre-wrap; }
.lqa-basis.open .lqa-basis-body { display: block; }
.lqa-steps { margin: 0; padding-left: 0; list-style: none; counter-reset: s; }
.lqa-steps li { counter-increment: s; position: relative; padding-left: 26px; margin: 3px 0; }
.lqa-steps li::before { content: counter(s); position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--lqa-primary); color: #fff; font-size: 12px; line-height: 18px; text-align: center; }
.lqa-warning { color: var(--lqa-warn); }
.lqa-refs { display: flex; flex-wrap: wrap; gap: 6px; }
.lqa-ref { border: 1px solid var(--lqa-line); background: var(--lqa-bg); color: var(--lqa-text); border-radius: 6px; padding: 3px 9px; font-size: 13px; cursor: pointer; }
.lqa-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--lqa-line); color: var(--lqa-muted); font-size: 12px; flex-wrap: wrap; }
.lqa-lead { border: 0; background: none; color: var(--lqa-primary); font-weight: 600; cursor: pointer; font-size: 13px; padding: 4px 0; }
.lqa-case { border-left: 3px solid #E8DCC8; padding: 2px 0 2px 10px; margin: 6px 0; }
.lqa-case-head { display: flex; gap: 8px; align-items: baseline; width: 100%; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.lqa-case-src { flex: 0 0 auto; font-size: 12px; color: #8A5A2B; background: #F6EEE5; border-radius: 4px; padding: 0 6px; white-space: nowrap; }
.lqa-case-title { flex: 1; font-size: 14px; color: var(--lqa-text); line-height: 1.6; }
.lqa-case-meta { font-size: 12px; color: var(--lqa-muted); margin-top: 2px; }
.lqa-case.open .lqa-basis-body { display: block; }
.lqa-case-link { color: var(--lqa-primary); font-size: 13px; }
.lqa-foot-acts { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.lqa-copy { border: 1px solid var(--lqa-line); background: #fff; color: var(--lqa-primary); border-radius: 14px; cursor: pointer; font-size: 12px; padding: 3px 10px; font-family: inherit; }
.lqa-reset { align-self: flex-end; border: 1px solid var(--lqa-line); background: #fff; color: var(--lqa-primary); border-radius: 16px; padding: 5px 12px; font-size: 13px; cursor: pointer; font-family: inherit; margin-bottom: 4px; }
.lqa-reset:hover, .lqa-copy:hover { border-color: var(--lqa-primary); }
/* 弹窗末尾的「下一步」按钮行 */
.xj-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--lqa-line); }
.xj-actions .xj-btn { padding: 8px 14px; font-size: 14px; }
.xj-related { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.lqa-ask ol { margin: 6px 0 0; padding-left: 22px; }
.lqa-typing { color: var(--lqa-muted); font-size: 14px; }
.lqa-form { display: flex; gap: 8px; position: sticky; bottom: 0; background: inherit; padding: 8px 0; }
.lqa-input { flex: 1; resize: none; border: 1px solid var(--lqa-line); border-radius: 10px; padding: 10px 12px; font-size: 16px; line-height: 1.6; font-family: inherit; min-height: 48px; max-height: 160px; background: #fff; }
.lqa-input:focus { outline: none; border-color: var(--lqa-primary); }
.lqa-send { border: 0; background: var(--lqa-primary); color: #fff; border-radius: 10px; padding: 0 20px; font-size: 15px; cursor: pointer; }
.lqa-send:disabled { opacity: .5; cursor: default; }
.lqa-note { color: var(--lqa-muted); font-size: 12px; text-align: center; }
/* 卡片、面板里的说明小字跟正文左对齐，只有输入框下方那行免责提示居中 */
.lqa-card .lqa-note, .g-panel .lqa-note, .lead-card .lqa-note { text-align: left; }

/* ===== 通用块：标签、表单、表格、弹窗（游客页与系统内页面共用） ===== */
.xj-tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: var(--lqa-bg); color: var(--lqa-muted); white-space: nowrap; }
.xj-tag.ok { background: #E4F1EA; color: var(--lqa-ok); }
.xj-tag.warn { background: #F7EEDD; color: var(--lqa-warn); }
.xj-tag.danger { background: #F6E3E1; color: var(--lqa-danger); }
.xj-tag.primary { background: var(--lqa-primary-soft); color: var(--lqa-primary); }
.xj-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.xj-field label { font-size: 14px; color: var(--lqa-text); font-weight: 600; }
.xj-field .hint { font-size: 12px; color: var(--lqa-muted); font-weight: 400; }
.xj-field input, .xj-field select, .xj-field textarea { border: 1px solid var(--lqa-line); border-radius: 8px; padding: 9px 11px; font-size: 16px; font-family: inherit; background: #fff; }
.xj-field input:focus, .xj-field select:focus, .xj-field textarea:focus { outline: none; border-color: var(--lqa-primary); }
.xj-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.xj-btn { border: 0; background: var(--lqa-primary); color: #fff; border-radius: 8px; padding: 10px 18px; font-size: 15px; cursor: pointer; }
.xj-btn.secondary { background: #fff; color: var(--lqa-primary); border: 1px solid var(--lqa-line); }
.xj-btn:disabled { opacity: .5; cursor: default; }
.xj-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.xj-table th, .xj-table td { border-bottom: 1px solid var(--lqa-line); padding: 8px 6px; text-align: left; vertical-align: top; }
.xj-table th { color: var(--lqa-muted); font-weight: 600; font-size: 13px; }
.xj-pre { white-space: pre-wrap; word-break: break-word; line-height: 1.85; font-size: 15px; }
.xj-mask { position: fixed; inset: 0; background: rgba(15, 25, 30, .45); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.xj-dialog { background: #fff; border-radius: 12px; max-width: 720px; width: 100%; max-height: 88vh; display: flex; flex-direction: column; }
.xj-dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--lqa-line); font-weight: 700; font-size: 16px; }
.xj-dialog-body { padding: 16px 18px; overflow-y: auto; }
.xj-close { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--lqa-muted); }
@media (max-width: 640px) {
    .xj-grid2 { grid-template-columns: 1fr; }
    .lqa-user { max-width: 92%; }
    .lqa-card { padding: 14px; }
}

/* ===== 公益咨询（律师端） ===== */
.leads-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.leads-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.leads-stat { background: #fff; border: 1px solid var(--lqa-line); border-radius: 10px; padding: 10px 14px; min-width: 120px; }
.leads-stat b { display: block; font-size: 20px; color: var(--lqa-primary); }
.leads-stat span { font-size: 12px; color: var(--lqa-muted); }
.lead-card { background: #fff; border: 1px solid var(--lqa-line); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.lead-card.hot { border-left: 3px solid var(--lqa-danger); }
.lead-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.lead-name { font-weight: 700; font-size: 15px; }
.lead-meta { color: var(--lqa-muted); font-size: 13px; }
.lead-content { white-space: pre-wrap; line-height: 1.75; font-size: 14px; margin: 6px 0; }
.lead-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.lead-actions select, .lead-actions input { border: 1px solid var(--lqa-line); border-radius: 6px; padding: 6px 8px; font-size: 14px; }
.lead-actions input { flex: 1; min-width: 160px; }
.lead-chat { font-size: 13px; color: #33393E; background: var(--lqa-bg); border-radius: 6px; padding: 8px 10px; margin-top: 6px; white-space: pre-wrap; display: none; }
.lead-chat.open { display: block; }
