*{box-sizing:border-box}body{margin:0;background:#f4f6f8;color:#172b3a;font:14px/1.6 "Segoe UI","Microsoft YaHei",sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer;background:#16766b;color:white;border:0;border-radius:7px;padding:9px 17px}button:hover{filter:brightness(.93)}button:disabled{opacity:.5;cursor:wait}.quiet{background:#e8eef0;color:#344b59}input,select,textarea{border:1px solid #ccd6dc;border-radius:7px;background:white;color:#172b3a;padding:9px 12px}label{display:block;margin:14px 0;color:#516572}label input{display:block;width:100%;margin-top:5px}textarea{width:100%;height:300px;resize:vertical;font:13px/1.6 Consolas,monospace}#login{min-height:100vh;display:grid;place-items:center;background:linear-gradient(130deg,#113b45,#1c625a)}#login[hidden],#shell[hidden]{display:none}#login form{background:white;padding:40px;width:min(440px,94vw);border-radius:18px;box-shadow:0 25px 80px #0003}#login button{width:100%;margin-top:12px}.brand{font-size:25px;font-weight:750;letter-spacing:2px}.brand span{font-size:14px;font-weight:400;letter-spacing:0;margin-left:8px}#shell{display:flex;min-height:100vh}aside{width:224px;background:#173641;color:#d6e4e8;padding:25px 18px;position:fixed;top:0;bottom:0;display:flex;flex-direction:column}aside small{color:#849da7;margin:36px 12px 10px}nav{display:grid;gap:6px;overflow:auto}nav a{text-align:left;background:transparent;color:#c0d3dc;padding:12px 15px}nav a.active{background:#2e565e;color:white;border-left:3px solid #73d5b9}.account{margin-top:auto;border-top:1px solid #34545e;padding-top:20px;display:grid;gap:10px}main{margin-left:224px;padding:30px 40px;width:calc(100% - 224px);max-width:1800px}header{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}header small{color:#81929e}h1{font-size:27px;margin:8px 0;font-weight:650}h2{font-size:19px;margin-top:0}#toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:20px}#notice{color:#aa3c30;margin:10px 0}.cards{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:16px;margin-bottom:24px}.card,.panel{background:white;border:1px solid #e1e7ea;border-radius:12px;padding:22px}.card .value{font-size:30px;font-weight:650;margin:8px 0}.card small{color:#8799a4}.card:first-child{border-top:3px solid #16766b}.table-wrap{background:white;border:1px solid #e0e6ea;border-radius:10px;overflow:auto}table{border-collapse:collapse;width:100%;white-space:nowrap}th{background:#f9fbfc;color:#738591;text-align:left;font-size:12px;font-weight:600}td,th{padding:13px 17px;border-bottom:1px solid #edf1f3}td{max-width:360px;overflow:hidden;text-overflow:ellipsis}td button{font-size:12px;margin-right:6px;padding:5px 10px}.empty{text-align:center;padding:70px;color:#899ba5;background:white;border-radius:12px}pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:480px;overflow:auto;font:13px/1.7 Consolas,monospace}.badge{padding:3px 8px;background:#e8f3ee;color:#2e715d;border-radius:5px}.actions{display:flex;justify-content:flex-end;gap:10px;margin-top:15px}dialog{border:0;border-radius:14px;padding:28px;width:min(780px,94vw);max-height:92vh;box-shadow:0 30px 100px #0004}dialog::backdrop{background:#102d3b80}#dialog-error,#login-error{color:#aa3c30}footer{margin-top:32px;color:#93a2ad;font-size:12px}.muted{color:#7e909d}.chart{display:flex;align-items:end;gap:8px;height:150px;padding-top:15px}.bar{flex:1;min-width:9px;background:#65b3a6;border-radius:3px 3px 0 0}#extra img{max-width:100%;max-height:340px}.pagination{margin-top:18px} @media(max-width:1000px){.cards{grid-template-columns:repeat(2,1fr)}main{padding:24px}aside{width:185px}main{margin-left:185px;width:calc(100% - 185px)}}@media(max-width:650px){aside{position:static;width:100%;padding:16px}#shell{display:block}nav{display:flex;flex-wrap:wrap}aside small,.account{margin:10px}main{margin:0;width:100%;padding:18px}.cards{gap:10px}.card{padding:15px}.card .value{font-size:24px}}
nav a { text-decoration:none; border-radius:7px; }
#toolbar label { margin:0; }
#toolbar label select { display:block; margin-top:5px; }

/* 管理员使用业务表单：金额/比例/时间直接输入，无代码编辑区。 */
dialog { width:min(900px,96vw); }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.form-field { min-width:0; }
.form-field label { margin:0 0 6px; }
.form-field input,.form-field select,.form-field textarea { width:100%; }
.form-field textarea { height:100px; font:inherit; }
.form-field small { display:block; margin-top:5px; }
.form-field.wide,.form-grid > .detail-list,.form-grid > p,.form-grid > details { grid-column:1/-1; }
.check-option { display:inline-flex!important; align-items:center; gap:8px; margin:4px 18px 8px 0!important; }
.check-option input { width:auto; margin:0; }
.repeat-row { border:1px solid #d6e2e5; border-radius:8px; margin:12px 0; padding:14px; }
.repeat-row > button { margin-top:10px; }
.detail-list { display:grid; grid-template-columns:minmax(110px,1fr) 3fr; gap:8px 16px; margin:0; width:100%; }
.detail-list dt { color:#627883; }.detail-list dd { margin:0; overflow-wrap:anywhere; white-space:pre-wrap; }
.detail-list dd > details { white-space:normal; }
.readonly-value { padding:9px 12px; background:#edf2f4; border-radius:7px; margin:0; }
#generated-key { width:100%; font-family:monospace; }
@media(max-width:650px){ .form-grid { grid-template-columns:1fr; }.detail-list { grid-template-columns:1fr; } }

/* 只读弹窗及其他隐藏控件不应被布局display规则重新显示。 */
[hidden] { display: none !important; }

/* 四类文章与图文一体审核工作区 */
.article-tabs{display:flex;gap:10px;margin:0 0 20px;flex-wrap:wrap}.article-tabs a{padding:10px 24px;border:1px solid #c5d7db;border-radius:8px;color:#294c58;text-decoration:none;background:#fff}.article-tabs a.active{background:#176873;color:#fff;border-color:#176873}
.article-filters{align-items:end;flex-wrap:wrap}.article-filters label{display:grid;gap:6px;font-size:13px;max-width:190px}.article-workspace{margin-top:28px;background:#fff;border:1px solid #d9e4e8;border-radius:14px;padding:28px}.article-workspace-heading{display:flex;justify-content:space-between;align-items:start;gap:20px}.article-workspace h3{margin-top:28px;border-top:1px solid #e3ecef;padding-top:20px}.article-workspace h2{overflow-wrap:anywhere}.article-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8;background:#f6f9fa;padding:18px;border-radius:8px}.article-images{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:20px}.article-image-card{border:1px solid #d8e5e8;border-radius:10px;padding:16px;min-width:0}.article-image-preview{display:block;max-width:100%;max-height:440px;object-fit:contain;margin:12px auto}.article-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:12px 0}.article-actions input[type=file]{max-width:100%}.redaction-canvas{display:block;max-width:100%;height:auto;touch-action:none;cursor:crosshair;border:1px solid #617a85}.prediction-card,.article-comment{padding:12px 16px;margin:10px 0;background:#f4f8fa;border-radius:8px;overflow-wrap:anywhere}.article-decision{border-top:2px solid #d8e5e8;margin-top:24px;padding-top:20px}.article-decision textarea{display:block;width:100%;height:100px;min-height:90px;margin-top:8px;font:inherit}.article-decision [role=alert],.article-image-card .error{color:#b23434}.article-workspace table td{white-space:normal;overflow-wrap:anywhere}.article-workspace .detail-list{grid-template-columns:180px 1fr}@media(max-width:700px){.article-workspace{padding:16px}.article-workspace .detail-list{grid-template-columns:1fr}.article-tabs a{padding:10px 14px}}

.draw-pagination { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:18px; }
.draw-pagination label { margin:0; }
.draw-pagination input { width:85px; }
#toolbar label input { display:block; margin-top:5px; }

/* 图文详情按作者顺序纵向阅读，不沿用附件卡片的多列布局。 */
.article-document .article-images{display:block}.article-document .article-images> *{margin:16px 0}.article-document>.article-text:empty{display:none}.article-document .article-image-preview{max-height:none;height:auto}

/* 文章详情与审核在原生模态弹框内阅读；正文中的图片和打码工具保持原位。 */
body.article-modal-open{overflow:hidden}
dialog.article-review-dialog{width:min(1180px,96vw);max-height:92vh;max-height:92dvh;padding:0;margin:auto;overflow:auto;overscroll-behavior:contain}
.article-review-dialog .article-workspace-heading{position:sticky;top:0;z-index:2;background:white;border-bottom:1px solid #e3ecef;padding:18px 24px}
.article-review-dialog .article-workspace-heading h2{margin:4px 0}
.article-review-dialog #article-close{flex-shrink:0}
.article-review-content{padding:24px}
@media(max-width:700px){dialog.article-review-dialog{width:96vw;max-height:96vh;max-height:96dvh}.article-review-dialog .article-workspace-heading{padding:14px 16px}.article-review-content{padding:16px}}

.community-form{width:min(640px,80vw);max-height:80vh;overflow:auto}.community-field{display:block;margin:12px 0}.community-evidence{white-space:pre-wrap;overflow-wrap:anywhere}.community-field textarea{width:100%;box-sizing:border-box}

.dialog-heading{position:sticky;top:-28px;z-index:5;background:white;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid #e0e6ea}.dialog-heading h2{margin:0}.detail-tabs,.list-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.detail-tabs .active,.list-tabs .active{background:#16766b;color:white}.detail-tab-body{min-height:120px}.detail-table th,.detail-table td{max-width:420px;white-space:normal;vertical-align:top}.detail-table{max-height:60vh;overflow:auto}.detail-table thead{position:sticky;top:0;z-index:1}.detail-list dd{overflow-wrap:anywhere}dialog .actions{position:sticky;bottom:-28px;background:white;padding:12px 0;z-index:3}

/* 帮助中心以文字和图片编辑，不向管理员暴露存储格式。 */
.help-block-editor{border:1px solid #d8e5e8;border-radius:10px;padding:16px;margin:12px 0;min-width:0}
.help-block-editor textarea{width:100%;min-height:120px;box-sizing:border-box}.help-block-editor input[type=file]{max-width:100%}
.help-editor-actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.help-image{display:block;max-width:100%;max-height:360px;object-fit:contain;margin:12px auto}
.help-preview{padding:16px;border:1px solid #d8e5e8;border-radius:10px;background:#f8fbfc;overflow-wrap:anywhere}
.help-preview p{white-space:pre-wrap;line-height:1.8}.help-preview figure{margin:16px 0}.help-preview figcaption{text-align:center;color:#627883}

.admin-pager{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:16px 4px}.admin-pager input{width:85px}.admin-pager select{width:125px}.admin-pager button{margin:0}

/* Author lookup is one input high; suggestions float without moving the filter row. */
#toolbar.article-filters{display:grid;grid-template-columns:90px 100px 150px minmax(190px,240px) minmax(180px,1fr) auto auto;gap:12px;align-items:end}
.article-filters>label,.article-author-filter{display:grid;gap:6px;max-width:none;min-width:0;font-size:13px}.article-author-filter>label{display:block}
#toolbar.article-filters label input,#toolbar.article-filters label select{margin-top:0;width:100%;height:40px}.article-filters>button{height:40px;white-space:nowrap}
.user-lookup{position:relative;width:100%;min-width:0}.user-lookup input{display:block;width:100%;height:40px;margin:0!important;padding-right:30px}
.user-lookup-list{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:30;background:#fff;border:1px solid #b9cdd4;border-radius:7px;box-shadow:0 6px 18px #1d394326;max-height:330px;overflow-y:auto}
.user-lookup-option{display:block;width:100%;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:white;color:#172b3a;border-radius:0;padding:8px 10px;margin:0}
.user-lookup-option:hover,.user-lookup-option[aria-selected=true]{background:#e6f4f1}.user-lookup-message{display:block;color:#637c88;padding:8px 10px;font-size:12px}
.user-lookup .user-lookup-clear{position:absolute;right:3px;top:3px;width:28px;height:34px;padding:0;background:transparent;color:#516b78;line-height:1}
@media(max-width:1200px){#toolbar.article-filters{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:650px){#toolbar.article-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}

#queue-types{display:flex;flex-wrap:wrap;gap:12px;flex-basis:100%;border:1px solid #d4e0e5;border-radius:8px;padding:12px}#queue-types label{display:flex;align-items:center;gap:5px}#queue-types input,#queue-auto{width:auto}.profile-review-image{display:block;width:240px;max-width:100%;max-height:320px;object-fit:contain;margin:16px 0}

.queue-review-dialog{width:min(800px,94vw);height:min(78vh,760px);max-width:94vw;padding:0;border:0;border-radius:12px;overflow:hidden}.queue-dialog-heading{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;border-bottom:1px solid #dde5e9}.queue-dialog-heading h2{font-size:18px;margin:0}.queue-review-dialog iframe{display:block;width:100%;height:calc(100% - 62px);border:0}.review-embedded #shell{display:block}.review-embedded aside,.review-embedded main>header,.review-embedded footer,.review-embedded .article-filters,.review-embedded #article-kinds{display:none}.review-embedded main{margin:0;padding:12px}.review-embedded[data-page="articles"] #content,.review-embedded[data-page="profile-reviews"] #content,.review-embedded[data-page="reports"] #content{display:none}.review-embedded dialog.article-workspace{width:100%;max-width:100%;max-height:100vh;border:0;border-radius:0;margin:0;padding:12px}.review-embedded dialog::backdrop{background:transparent}.review-embedded .article-workspace-heading{display:none}.review-embedded .article-review-content{padding:0}.review-embedded #profile-detail p{margin:5px 0}.review-embedded .profile-review-image{width:150px;max-height:180px;margin:8px 0}.review-embedded #profile-reason{min-height:60px}.review-embedded .article-actions{margin-top:10px}

.review-queue-filters{display:grid;grid-template-columns:minmax(220px,1fr) 200px auto auto;gap:12px;align-items:end}.review-queue-filters #queue-types{grid-column:1/-1;gap:6px 12px;padding:8px 10px}.review-queue-filters #queue-types label{margin:0;min-height:24px;font-size:13px}.review-queue-filters label{margin:0}.review-queue-filters .queue-auto-label{display:flex;align-items:center;gap:6px;white-space:nowrap;align-self:center}.review-queue-filters .queue-auto-label input{display:inline;width:16px;height:16px;min-height:16px;margin:0}.review-queue-filters #queue-query{justify-self:start}.queue-review-dialog.compact-profile{width:min(640px,94vw);height:min(560px,88vh)}.review-embedded #profile-reason{height:72px;min-height:72px;max-height:120px;resize:vertical}.review-embedded[data-page="review-item"] main h2{display:none}
@media(max-width:1100px){.review-queue-filters{grid-template-columns:minmax(180px,1fr) minmax(160px,1fr)}}

#profile-reason,.review-embedded #profile-reason,#article-reason{height:40px;min-height:40px;max-height:40px}#profile-detail p{margin:5px 0}.profile-review-image{width:150px;max-height:180px;margin:8px 0}

/* 用户基本资料按字段分栏阅读，避免单条资料被挤成横向表格。 */
dialog.user-detail-dialog{width:min(1200px,96vw)}
.user-detail-profile .detail-list{display:grid;grid-template-columns:150px minmax(0,1fr) 150px minmax(0,1fr);margin:0;border:1px solid #e0e6ea;border-radius:10px;overflow:hidden}
.user-detail-profile .detail-list dt,.user-detail-profile .detail-list dd{margin:0;padding:12px 16px;border-bottom:1px solid #edf1f3;min-width:0;overflow-wrap:anywhere}
.user-detail-profile .detail-list dt{background:#f7fafb;color:#738591;font-weight:600}
.user-detail-profile .detail-list dd{color:#172b3a;background:white}
@media(max-width:850px){.user-detail-profile .detail-list{grid-template-columns:140px minmax(0,1fr)}}
@media(max-width:500px){dialog.user-detail-dialog{padding:18px}.user-detail-profile .detail-list{grid-template-columns:112px minmax(0,1fr)}.user-detail-profile .detail-list dt,.user-detail-profile .detail-list dd{padding:10px 12px}}

/* 后台列表占满可用页面宽度；列保持完整，小屏在列表内左右滚动。 */
main{max-width:none;min-width:0}#content{min-width:0;width:100%}.table-wrap{width:100%;max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-gutter:stable}
.table-wrap>table{min-width:100%;width:max-content}.table-wrap>table th,.table-wrap>table td{white-space:nowrap}
