/* Internal article table (站内文章 tab of the project article workspace). Loaded after styles.css
   and geo-monitor.css, so these rules win on equal specificity. Shared label controls
   (.article-label-controls, .article-identity-chip) come from geo-monitor.css. */

.aw-table-wrap{min-height:320px;max-height:calc(100vh - 262px);overflow:auto;border:1px solid #e6e4ef;border-radius:10px;background:#fff}
.workspace-split-main .aw-table-wrap{height:auto}
.project-article-workspace-page .workspace-split-main .project-article-list.aw-table-wrap{overflow:auto;margin-top:0}

.aw-table{width:100%;min-width:1180px;border-collapse:separate;border-spacing:0;font-size:12px;color:#3a3c4d;table-layout:fixed}
.aw-table col.aw-col-check{width:58px}
.aw-table col.aw-col-title{width:auto}
.aw-table col.aw-col-type{width:190px}
.aw-table col.aw-col-special{width:150px}
.aw-table col.aw-col-copywriter{width:124px}
.aw-table col.aw-col-date{width:124px}
.aw-table col.aw-col-status{width:64px}
.aw-table col.aw-col-actions{width:224px}

.aw-table thead th{position:sticky;top:0;z-index:2;padding:7px 8px;border-bottom:1px solid #e6e4ef;background:#f7f6fb;color:#777a8d;font-size:11px;font-weight:600;text-align:left;white-space:nowrap}
.aw-table tbody td{height:40px;padding:2px 8px;border-bottom:1px solid #efedf5;vertical-align:middle;background:#fff}
.aw-table tbody tr:last-child td{border-bottom:0}
.aw-table tbody tr:hover td{background:#fbfaff}
.aw-table tr.project-article-item{display:table-row;padding:0}
.aw-table tr.project-article-item.inactive td{color:#8d90a0}
.aw-table tr.project-article-item.inactive .project-article-state{background:#f0f0f4;color:#7c7f91}
.aw-table tr.is-highlight td{background:#fff6cf;transition:background-color 2.4s ease-out}
.aw-table tr.is-highlight.is-fading td{background:#fff}
.aw-table tr.aw-empty-row td{height:auto;padding:18px 8px;color:#858897;text-align:center}
.aw-table tr.aw-empty-row[hidden]{display:none}
.aw-table tbody tr[hidden]{display:none}
.aw-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Checkbox + drag handle */
.aw-col-check{padding-left:10px !important;white-space:nowrap}
.aw-col-check .project-article-select{width:14px;height:14px;margin:0 6px 0 0;vertical-align:middle;accent-color:#6255d9;cursor:pointer}
.aw-col-check .project-article-drag{color:#b8b6c6;font-size:13px;vertical-align:middle;cursor:grab;user-select:none}
.project-article-item[draggable="false"] .project-article-drag{cursor:default;opacity:.45}
.project-article-item.is-dragging td{background:#f3f0ff}

/* Title + path */
.aw-col-title{min-width:260px}
.aw-title-line{display:flex;align-items:center;gap:6px;min-width:0;height:22px}
.aw-title-input{box-sizing:border-box;flex:1;min-width:0;height:22px;padding:0 6px;border:1px solid transparent;border-radius:6px;background:transparent;color:#2f3142;font:inherit;font-size:13px;font-weight:500;outline:none;text-overflow:ellipsis}
.aw-title-input::placeholder{color:#a9abb8;font-weight:400}
.aw-title-input:hover{border-color:#dedbea;background:#fff}
.aw-title-input:focus{border-color:#7669dc;background:#fff;box-shadow:0 0 0 3px #6659d914}
.aw-col-title .internal-title-status{flex:none;font-size:11px}
.aw-path{display:block;overflow:hidden;margin:0 0 0 6px;color:#9a9db0;font-size:10.5px;line-height:13px;text-overflow:ellipsis;white-space:nowrap;text-decoration:none}
.aw-path:hover{color:#6255d9;text-decoration:none}
.aw-col-title .project-article-url-history{display:block;margin:2px 0 0 6px;overflow:hidden;color:#b0b2bf;font-size:10px;text-overflow:ellipsis;white-space:nowrap}
.aw-url-editor{display:grid;gap:4px}
.aw-url-editor .project-article-url-input{box-sizing:border-box;width:100%;height:28px;padding:0 7px;border:1px solid #7669dc;border-radius:6px;background:#fff;color:#424555;font:inherit;font-size:12px;outline:none}
.aw-url-editor .project-article-url-hint{color:#a87517;font-size:11px;line-height:1.4}
.aw-inline-actions{display:inline-flex;gap:4px;margin-top:2px}
.aw-inline-actions button{height:24px;padding:0 8px;border:1px solid #d9d6ea;border-radius:6px;background:#fff;color:#6255d9;font:inherit;font-size:11px;font-weight:600;cursor:pointer}
.aw-inline-actions button+button{color:#777a8d;border-color:#e4e2ee}

/* Type and special cells (shared label controller, compact) */
.aw-labels{display:flex;flex-wrap:nowrap;align-items:center;gap:6px;font-size:12px}
.aw-labels .article-identity-group{display:inline-flex;gap:4px;align-items:center}
.aw-labels .article-identity-group > small{display:none}
.aw-labels .article-identity-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 7px;border:1px solid #e0ddef;border-radius:6px;background:#fff;color:#6c6f82;font-size:11px;font-weight:600;cursor:pointer;user-select:none}
.aw-labels .article-identity-chip:has(input:checked){background:#f1eeff;border-color:#b9b0ee;color:#5a4fd0}
.aw-labels .article-identity-chip input{width:12px;height:12px;margin:0;accent-color:#6255d9}
.aw-labels-type .article-label-status{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.aw-labels-type [data-special-test-control]{display:none}
.aw-labels-special [hidden]{display:none}
.aw-labels-special select{width:100%;min-width:0;max-width:136px;height:28px;padding:0 6px;border:1px solid #dedbea;border-radius:6px;background:#fff;color:#4b4e61;font:inherit;font-size:11px}
.aw-labels-special select:disabled{background:#fafafc;color:#b0b2bf}
.aw-labels-special label[data-special-test-control]{min-width:0}
.aw-labels-special label[data-special-test-control][hidden]{display:none}
.aw-labels-special .article-label-status{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.aw-special-na{color:#b0b2bf;font-size:11px}
.aw-labels-special .aw-special-na{display:none}
.aw-labels-special label[data-special-test-control][hidden]+.aw-special-na{display:inline}
.aw-labels-special [data-label-field="identitySeo"],.aw-labels-special [data-label-field="identityGeo"]{display:none}

/* Copywriter, date, status */
.aw-table .project-article-copywriter-input{box-sizing:border-box;width:100%;height:28px;padding:0 6px;border:1px solid transparent;border-radius:6px;background:transparent;color:#424555;font:inherit;font-size:12px;outline:none}
.aw-table .project-article-copywriter-input::placeholder{color:#b0b2bf}
.aw-table .project-article-copywriter-input:hover{border-color:#dedbea;background:#fff}
.aw-table .project-article-copywriter-input:focus{border-color:#7669dc;background:#fff;box-shadow:0 0 0 3px #6659d914}
.aw-date-editor{display:grid;gap:4px}
.aw-table .project-article-date-input{box-sizing:border-box;width:100%;height:28px;padding:0 4px;border:1px solid #7669dc;border-radius:6px;font:inherit;font-size:12px}
.aw-table .project-article-date-edit{padding:3px 6px;border:1px solid transparent;border-radius:6px;background:transparent;color:#4b4e61;font:inherit;font-size:12px;cursor:pointer}
.aw-table .project-article-date-edit:hover{border-color:#dcd9ef;background:#f7f5ff}
.aw-table .project-article-date-missing{padding:3px 6px;border:1px dashed #e0a14a;border-radius:6px;background:#fff8ec;color:#a46d12;font:inherit;font-size:11px;cursor:pointer}
.aw-col-status .project-article-state{display:inline-block;padding:2px 7px;border-radius:999px;background:#e8f6ee;color:#2c7a4b;font-size:11px;font-weight:600}

/* Always-visible row actions; keep them reachable while the table scrolls horizontally. */
.aw-table .aw-col-actions{position:sticky;right:0;z-index:1;border-left:1px solid #efedf5}
.aw-table thead .aw-col-actions{z-index:3}
.aw-row-actions{display:flex;justify-content:center;align-items:center;gap:4px;white-space:nowrap}
.aw-row-actions button{height:28px;padding:0 7px;border:1px solid transparent;border-radius:6px;background:transparent;color:#6255d9;font:inherit;font-size:11px;cursor:pointer;white-space:nowrap}
.aw-row-actions button:hover{border-color:#e0ddef;background:#f1eeff}
.aw-row-actions button:focus-visible{outline:2px solid #7669dc;outline-offset:1px}
.aw-row-actions button.danger{color:#c24b58}
.aw-row-actions button.danger:hover{border-color:#f0c9ce;background:#fdeef0;color:#b13a47}

/* Top bar: add dropdown and batch bar */
.aw-add-menu{position:relative;display:inline-block}
.aw-add-menu>.primary-btn{height:34px;white-space:nowrap}
.aw-add-options{position:absolute;right:0;top:calc(100% + 6px);z-index:40;display:grid;min-width:168px;padding:5px;border:1px solid #dedbea;border-radius:10px;background:#fff;box-shadow:0 12px 32px #29273d24}
.aw-add-options[hidden]{display:none}
.aw-add-options button{height:32px;padding:0 10px;border:0;border-radius:6px;background:transparent;color:#3a3c4d;font:inherit;font-size:12px;text-align:left;cursor:pointer;white-space:nowrap}
.aw-add-options button:hover{background:#f1eeff;color:#5a4fd0}

.aw-filter-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-bottom:8px}
.aw-filter-bar label:not(.aw-check){display:flex;flex-direction:row;align-items:center;gap:6px}
.workspace-panel-tools .aw-title-progress{margin:0 4px 0 0;max-width:300px;color:#858897;font-size:11px;line-height:1.4;text-align:right}
.project-article-workspace-page .workspace-panel-tools .aw-title-progress{margin:0 4px 0 0}
.project-article-workspace-page .workspace-panel-tools{min-width:0;max-width:100%}

@media(max-width:760px){
  .project-article-workspace-page .workspace-panel-tools{width:100%;justify-content:flex-start}
  .project-article-workspace-page .workspace-panel-tools .aw-title-progress{flex-basis:100%;max-width:none;margin:0;text-align:left;overflow-wrap:anywhere}
  .workspace-panel-tools .aw-add-options{left:0;right:auto}
}

.aw-filter-bar .project-article-search{position:relative;display:block;flex:1 1 220px;min-width:200px;max-width:340px;height:34px;margin:0}
.aw-filter-bar .project-article-search span{top:9px}
.aw-filter-bar .project-article-search input{width:100%;height:34px}
.aw-filter-bar label>span:first-child{color:#858897;font-size:11px;white-space:nowrap}
.aw-filter-bar>.aw-check{box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:6px;flex:none;height:34px;padding:0 10px;border:1px solid #e0ddef;border-radius:8px;background:#fff;color:#656879;font-size:12px;line-height:1;cursor:pointer}
.aw-check input{flex:none;width:14px;height:14px;margin:0;accent-color:#6255d9}
.aw-check span{white-space:nowrap}
.aw-filter-bar>.aw-check:has(input:checked){border-color:#b9b0ee;background:#f1eeff;color:#5a4fd0}
.aw-filter-bar>.aw-check:focus-within{outline:2px solid #7669dc;outline-offset:2px}
.aw-selection-hint{margin:8px 0;color:#858897;font-size:12px;line-height:1.5}
.aw-selection-hint[hidden]{display:none}

.aw-batch-bar{display:grid;gap:8px;margin:0 0 10px;padding:10px 12px;border:1px solid #d9d4f3;border-radius:10px;background:#f8f7ff}
.aw-batch-bar[hidden]{display:none}
.aw-batch-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.aw-batch-row>span:first-child{margin-right:4px;color:#5a4fd0;font-size:12px;font-weight:600}
.aw-batch-label{min-width:56px;color:#6c6f82;font-size:12px;font-weight:600}
.aw-batch-bar button{height:30px;padding:0 10px;border:1px solid #d8d4f1;border-radius:7px;background:#fff;color:#6255d9;font:inherit;font-size:12px;font-weight:600;cursor:pointer}
.aw-batch-bar button:hover:not(:disabled){background:#f7f5ff}
.aw-batch-bar button:disabled{opacity:.45;cursor:not-allowed}
.aw-batch-bar button.danger{color:#c24b58;border-color:#f0c9ce}
.aw-batch-bar input#projectArticleCopywriterValue{width:200px;height:30px;padding:0 9px;border:1px solid #dedde8;border-radius:7px;background:#fff;color:#424555;font:inherit;font-size:12px;outline:none}
.aw-batch-bar input#workspaceExternalCopywriterValue{width:200px;height:30px;padding:0 9px;border:1px solid #dedde8;border-radius:7px;background:#fff;color:#424555;font:inherit;font-size:12px;outline:none}
.aw-batch-bar .article-label-batch{align-items:center}
.aw-batch-bar [data-label-batch-controls]{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}
.aw-batch-bar [data-label-batch-controls] .article-label-controls{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.aw-batch-bar [data-label-batch-controls] select{width:150px;height:30px;padding:0 6px;border:1px solid #dedbea;border-radius:7px;background:#fff;font:inherit;font-size:12px}
.aw-batch-bar [data-label-batch-controls] [data-label-batch-hint]{flex-basis:100%;color:#858897;font-size:11px}
.aw-batch-bar [data-label-batch-controls] label[hidden]{display:none}
.aw-batch-spacer{flex:1 1 auto}
.aw-batch-bar [data-label-batch-controls]{flex:0 1 auto !important}
.aw-batch-bar [data-label-batch-hint]{flex-basis:auto !important;white-space:nowrap}
.aw-batch-bar [data-label-batch-controls] .article-label-status{display:none}

/* 新增文章 dialog */
.aw-add-dialog{width:min(640px,calc(100vw - 28px));max-height:calc(100vh - 48px);padding:0;border:0;border-radius:14px;box-shadow:0 24px 80px #29273d42;color:#343647;text-align:left}
.aw-add-dialog::backdrop{background:#28263880}
.aw-add-dialog-head{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid #ececf2}
.aw-add-dialog-head h3{margin:0;font-size:15px}
.aw-add-dialog-head button{width:28px;height:28px;padding:0;border:0;background:transparent;color:#777a8d;font-size:18px;cursor:pointer}
.aw-add-tabs{display:flex;flex-wrap:wrap;gap:6px;padding:12px 18px 0}
.aw-add-tabs button{height:30px;padding:0 12px;border:1px solid #e0ddef;border-radius:999px;background:#fff;color:#5b5e72;font:inherit;font-size:12px;cursor:pointer}
.aw-add-tabs button[aria-selected="true"]{border-color:#6255d9;background:#6255d9;color:#fff}
.aw-add-panel{display:grid;gap:10px;padding:14px 18px}
.aw-add-panel[hidden]{display:none}
.aw-add-help{margin:0;color:#77798a;font-size:12px;line-height:1.5}
.aw-add-panel .project-article-add{display:flex;flex-wrap:wrap;gap:8px}
.aw-add-panel .project-article-add input{flex:1 1 180px;min-width:0;height:34px;padding:0 9px;border:1px solid #dedde8;border-radius:8px;font:inherit;font-size:12px}
.aw-add-panel .project-article-add button,.aw-add-actions button{height:34px;padding:0 14px;font:inherit;font-size:12px;font-weight:600;border-radius:8px;cursor:pointer}
.aw-add-panel textarea{box-sizing:border-box;width:100%;min-height:150px;padding:9px;border:1px solid #dedde8;border-radius:8px;font:inherit;font-size:12px;resize:vertical}
.aw-add-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.aw-add-actions button{border:1px solid #d9d6ea;background:#fff;color:#6255d9}
.aw-add-dialog .primary-btn{border:0}
.aw-add-dialog .aw-dialog-message{margin:0 18px;min-height:0}
.aw-add-dialog .aw-dialog-message:empty{display:none}
.aw-add-dialog-foot{display:flex;justify-content:flex-end;padding:12px 18px 16px}
.aw-add-dialog-foot button{height:34px;padding:0 16px;border-radius:8px}

@media(max-width:1400px){.aw-table{min-width:1024px}.aw-table col.aw-col-type{width:146px}.aw-table col.aw-col-special{width:96px}.aw-table col.aw-col-copywriter{width:88px}.aw-table col.aw-col-date{width:104px}.aw-table col.aw-col-status{width:60px}.aw-table col.aw-col-actions{width:212px}}
@media(max-width:760px){.aw-table .aw-col-actions{position:static}}

/* 站外文章表格（src/article-workspace-external.js）：站内表格样式之上，只补站外独有的列与弹窗表单。 */
.aw-table col.aw-col-domain{width:132px}
.aw-table .aw-domain{display:block;overflow:hidden;color:#6c6f82;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.aw-external-table{min-width:1100px}
.aw-external-table col.aw-col-check{width:40px}
.aw-external-table col.aw-col-title{width:auto}
.aw-external-table col.aw-col-domain{width:120px}
.aw-external-table col.aw-col-type{width:136px}
.aw-external-table col.aw-col-special{width:120px}
.aw-external-table col.aw-col-copywriter{width:96px}
.aw-external-table col.aw-col-date{width:100px}
.aw-external-table col.aw-col-status{width:84px}
.aw-external-table col.aw-col-actions{width:154px}
.aw-external-table .aw-col-title{min-width:170px}
.aw-external-table .aw-labels-type .article-identity-group{flex-wrap:nowrap}
.aw-external-table .aw-labels .article-identity-chip{gap:3px;padding:3px 5px}
.aw-external-table .aw-col-check{padding-left:8px !important}
.aw-external-table .aw-col-status{white-space:nowrap}
.aw-external-table .external-title-status{display:inline-flex;flex:none;align-items:center;gap:4px;font-size:11px;white-space:nowrap}
.aw-external-table .external-title-status small{font-size:11px}
.aw-external-table .workspace-external-stale{display:inline-block;margin-left:4px;padding:1px 5px;border-radius:6px;background:#fff3da;color:#a87517;font-size:10px;font-weight:600;vertical-align:middle}
.aw-external-table .external-title-missing{color:#a87517}
.aw-external-table .external-title-auto{font-style:normal}
.aw-message-action{height:24px;margin-left:6px;padding:0 8px;border:1px solid #d9d6ea;border-radius:6px;background:#fff;color:#6255d9;font:inherit;font-size:11px;font-weight:600;cursor:pointer}
.aw-message-action:hover{background:#f7f5ff}

/* 登记表单（单篇添加 / 编辑）：字段 id 与原表单一致，外壳改为弹窗内的纵向排版 */
.aw-external-form-panel #externalMonitorArticleForm{display:grid;gap:10px}
.aw-external-form-panel #externalMonitorArticleForm>label{display:grid;gap:4px;color:#4b4e61;font-size:12px}
.aw-external-form-panel #externalMonitorArticleForm input:not([type="checkbox"]),.aw-external-form-panel #externalMonitorArticleForm select{box-sizing:border-box;width:100%;height:34px;padding:0 9px;border:1px solid #dedde8;border-radius:8px;background:#fff;color:#343647;font:inherit;font-size:12px;outline:none}
.aw-external-form-panel #externalMonitorArticleForm input:focus,.aw-external-form-panel #externalMonitorArticleForm select:focus{border-color:#7669dc;box-shadow:0 0 0 3px #6659d914}
.aw-external-form-panel #externalMonitorArticleForm input:disabled{background:#f4f4f8;color:#9294a2}
.aw-external-form-panel .workspace-external-form-row{display:grid;gap:10px}
.aw-external-form-panel .workspace-external-domain-row{display:flex;gap:7px}
.aw-external-form-panel .workspace-external-domain-row input{flex:1;min-width:0}
.aw-external-form-panel .workspace-external-domain-row button{height:34px;padding:0 10px;border:1px solid #d9d6ea;border-radius:8px;background:#fff;color:#6255d9;font:inherit;font-size:12px;cursor:pointer;white-space:nowrap}
.aw-external-form-panel .workspace-external-full-field{grid-column:1/-1}
.aw-external-form-panel .target-keyword-editor-hint{margin:0;color:#858897;font-size:11px;line-height:1.5}
.aw-external-form-panel .aw-add-actions{justify-content:flex-end}
.aw-external-form-panel .aw-add-actions button{height:34px;padding:0 14px;border:1px solid #d9d6ea;border-radius:8px;background:#fff;color:#6255d9;font:inherit;font-size:12px;font-weight:600;cursor:pointer}
.aw-external-form-panel .aw-add-actions .primary-btn{border:0;background:#6255d9;color:#fff}
.aw-external-form-panel .workspace-external-restore-toggle{display:flex;align-items:center;gap:6px;color:#555868;font-size:12px}
.aw-external-form-panel .workspace-external-restore-toggle input{accent-color:#6255d9}
#workspaceExternalDialog .aw-add-actions .primary-btn{border:0;background:#6255d9;color:#fff}
#workspaceExternalDialog .aw-add-tabs[hidden]{display:none}
/* Every column except the checkbox and 标题 / 地址 is centred (header and cells), so numbers and
   short values never read as right-aligned figures of a neighbouring column. */
.aw-table thead th:nth-child(n+3),.aw-table tbody td:nth-child(n+3){text-align:center}
.aw-table tbody td:nth-child(n+3) .aw-labels{justify-content:center}
.aw-table tbody td .project-article-copywriter-input{text-align:center}


/* Virtual gaps carry layout only, never controls or sticky/action cell styling. */
.aw-table .aw-virtual-spacer td { padding: 0; border: 0; line-height: 0; min-height: 0; background: transparent; }
.aw-table-wrap { overflow-anchor: none; }
