/* 主站内容编辑器 */
.site-editor { border: 1px solid var(--line, #d9e2ef); border-radius: 16px; background: #fff; overflow: hidden; }
.site-editor-tabs { display: flex; gap: 4px; padding: 9px; border-bottom: 1px solid var(--line, #d9e2ef); background: #f7f9fc; }
.site-editor-tabs button { border: 0; background: transparent; color: #5d6d7e; border-radius: 9px; padding: 9px 14px; font-size: 13px; font-weight: 650; }
.site-editor-tabs button.active { background: #1f3b33; color: #fff; }
.site-editor-body { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: 560px; }
.site-editor-list { border-right: 1px solid var(--line, #d9e2ef); padding: 10px; background: #fbfcfe; max-height: 720px; overflow-y: auto; }
.site-list-tools { display: flex; gap: 6px; margin-bottom: 8px; }
.site-list-tools button { flex: 1; border: 1px solid #dfe6ef; background: #fff; border-radius: 8px; padding: 7px; font-size: 12px; }
.site-list-item { border: 1px solid #e4ebf3; border-radius: 10px; padding: 10px; margin-bottom: 7px; background: #fff; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; align-items: start; }
.site-list-item.active { border-color: #1f3b33; box-shadow: 0 0 0 2px rgba(31,59,51,.09); }
.site-list-item .site-list-title { font-size: 13px; font-weight: 650; color: #17241f; line-height: 1.45; cursor: pointer; }
.site-list-item .site-list-meta { margin-top: 4px; color: #8a97a5; font-size: 10px; line-height: 1.5; }
.site-list-actions { display: flex; gap: 2px; }
.site-list-actions button { border: 0; background: #f1f5f9; border-radius: 5px; color: #59697a; width: 24px; height: 24px; font-size: 11px; padding: 0; }
.site-list-actions button:hover { background: #e2eaf2; }
.site-editor-form { padding: 18px 20px 26px; min-width: 0; }
.site-form-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 15px; }
.site-form-head h2 { margin: 0; font-size: 20px; color: #17241f; }
.site-form-head p { margin: 4px 0 0; color: #8a97a5; font-size: 11px; }
.site-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.site-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.site-field.full { grid-column: 1 / -1; }
.site-field label { color: #59697a; font-size: 11px; font-weight: 600; }
.site-field input, .site-field select, .site-field textarea {
  width: 100%; box-sizing: border-box; border: 1px solid #dce4ee; border-radius: 8px; background: #fff;
  color: #17241f; padding: 9px 10px; font-size: 13px; outline: none; font-family: inherit;
}
.site-field input:focus, .site-field select:focus, .site-field textarea:focus { border-color: #4d7c6b; box-shadow: 0 0 0 3px rgba(77,124,107,.1); }
.site-field textarea { min-height: 110px; resize: vertical; line-height: 1.7; }
.site-field textarea.body-editor { min-height: 260px; font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; }
.site-cover-row { display: flex; gap: 10px; align-items: flex-start; }
.site-cover-preview { width: 170px; height: 96px; border-radius: 8px; border: 1px dashed #cfdae6; background: #f7f9fc; overflow: hidden; display: grid; place-items: center; color: #9aa8b6; font-size: 11px; flex: 0 0 auto; }
.site-cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.site-upload-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid #cfdae6; background: #fff; border-radius: 8px; padding: 8px 10px; font-size: 11px; cursor: pointer; }
.site-upload-btn:hover { border-color: #4d7c6b; color: #1f3b33; }
.site-form-actions { display: flex; gap: 8px; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid #edf1f6; }
.site-form-actions button { border: 0; border-radius: 9px; padding: 10px 15px; font-size: 12px; font-weight: 650; }
.site-save { background: #1f3b33; color: #fff; }
.site-save:hover { background: #2c5145; }
.site-delete { background: #fff0ee; color: #b84a3a; margin-left: auto; }
.site-insert-image { background: #eef4f1; color: #285547; }
.site-form-hint { color: #8a97a5; font-size: 10px; line-height: 1.6; margin: 7px 0 0; }
.site-editor-note { margin: 0; padding: 10px 14px; border-top: 1px solid #edf1f6; background: #fbfcfe; color: #8a97a5; }
.site-home-card { max-width: 620px; }
.site-home-card h2 { margin: 0 0 6px; font-size: 20px; }
.site-home-card p { color: #6c7a8a; font-size: 12px; line-height: 1.7; margin: 0 0 16px; }
.site-empty { padding: 30px 12px; color: #8a97a5; font-size: 12px; text-align: center; }
@media (max-width: 800px) {
  .site-editor-body { grid-template-columns: 1fr; }
  .site-editor-list { border-right: 0; border-bottom: 1px solid #edf1f6; max-height: 230px; }
  .site-editor-form { padding: 15px; }
  .site-form-grid { grid-template-columns: 1fr; }
  .site-field.full { grid-column: auto; }
  .site-cover-row { flex-direction: column; }
  .site-cover-preview { width: 100%; height: 150px; }
}


/* 正文可视化编辑器 */
.site-rte-toolbar { display: flex; flex-wrap: wrap; gap: 5px; padding: 7px; border: 1px solid #dce4ee; border-bottom: 0; border-radius: 8px 8px 0 0; background: #f8fafc; }
.site-rte-toolbar button, .site-rte-toolbar .site-upload-btn { border: 1px solid #dce4ee; background: #fff; border-radius: 6px; padding: 5px 9px; font-size: 11px; color: #526477; cursor: pointer; min-height: 28px; }
.site-rte-toolbar button:hover, .site-rte-toolbar .site-upload-btn:hover { border-color: #4d7c6b; color: #1f3b33; }
.site-rte { min-height: 260px; max-height: 560px; overflow-y: auto; padding: 15px 16px; border: 1px solid #dce4ee; border-radius: 0 0 8px 8px; background: #fff; color: #263238; font-size: 14px; line-height: 1.85; outline: none; }
.site-rte:focus { border-color: #4d7c6b; box-shadow: 0 0 0 3px rgba(77,124,107,.1); }
.site-rte h2 { font-size: 20px; margin: 14px 0 8px; color: #17241f; }
.site-rte blockquote { margin: 12px 0; padding: 8px 12px; border-left: 3px solid #a44737; background: #f8f6f0; color: #59697a; }
.site-rte img { display: block; max-width: 100%; height: auto; margin: 10px 0; border-radius: 6px; }
.site-rte figure { margin: 14px 0; }
.site-rte figcaption { color: #8a97a5; font-size: 10px; text-align: center; }
.site-rte p { margin: 0 0 10px; }
.site-rte ul { padding-left: 22px; }


/* 编辑权限 */
.site-editors-panel { margin-top: 18px; border: 1px solid #d9e2ef; border-radius: 16px; background: #fff; padding: 18px; }
.site-editors-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.site-editors-head h2 { margin: 0; font-size: 18px; color: #17241f; }
.site-editors-head p { margin: 4px 0 0; color: #8a97a5; font-size: 11px; }
.site-editor-create { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; padding: 12px; background: #f8fafc; border: 1px solid #edf1f6; border-radius: 10px; }
.site-editor-create label { display: flex; flex-direction: column; gap: 4px; color: #59697a; font-size: 10px; font-weight: 600; min-width: 130px; flex: 1; }
.site-editor-create input { border: 1px solid #dce4ee; border-radius: 7px; padding: 8px 9px; font-size: 12px; font-family: inherit; }
.site-editor-create .site-save { border: 0; border-radius: 8px; padding: 9px 14px; color: #fff; background: #1f3b33; font-size: 12px; font-weight: 650; min-height: 36px; }
.site-editors-list { margin-top: 10px; }
.site-editor-row { display: flex; align-items: center; gap: 10px; padding: 9px 3px; border-bottom: 1px solid #edf1f6; }
.site-editor-row .se-name { font-size: 13px; font-weight: 650; color: #17241f; }
.site-editor-row .se-meta { color: #8a97a5; font-size: 10px; font-family: monospace; }
.site-editor-row .se-status { margin-left: auto; font-size: 10px; padding: 3px 7px; border-radius: 999px; background: #eef4f1; color: #285547; }
.site-editor-row .se-status.off { background: #f3f4f6; color: #8a97a5; }
.site-editor-row button { border: 1px solid #dce4ee; background: #fff; border-radius: 6px; padding: 5px 8px; font-size: 10px; color: #59697a; }
.site-editor-row button:hover { border-color: #4d7c6b; color: #1f3b33; }
.site-editors-hidden { display: none; }
@media (max-width: 800px) {
  .site-editor-create { flex-direction: column; align-items: stretch; }
  .site-editor-create label { min-width: 0; }
}


/* 比赛消息 */
.site-competition-list { border-top: 1px solid #edf1f6; }
.site-competition-row { display: grid; grid-template-columns: 78px minmax(0,1fr) 100px; gap: 10px; align-items: baseline; padding: 11px 3px; border-bottom: 1px solid #edf1f6; text-decoration: none; }
.site-competition-row:hover { background: #fbfcfe; }
.site-competition-date { color: #8a97a5; font-family: monospace; font-size: 10px; }
.site-competition-title { color: #263238; font-size: 13px; line-height: 1.55; }
.site-competition-source { color: #285547; font-size: 10px; text-align: right; }
@media (max-width: 800px) {
  .site-competition-row { grid-template-columns: 66px minmax(0,1fr); }
  .site-competition-source { grid-column: 2; text-align: left; }
}


/* 比赛勾选 + 待办 */
.site-competition-row { grid-template-columns: 26px 78px minmax(0,1fr) 100px; }
.site-comp-check { display: flex; align-items: center; justify-content: center; }
.site-comp-check input { width: 15px; height: 15px; accent-color: #1f3b33; }
.site-competition-title { color: #263238; font-size: 13px; line-height: 1.55; text-decoration: none; }
.site-competition-title:hover { color: #a44737; }
.site-todo-editor { margin-top: 18px; border-top: 1px solid #edf1f6; padding-top: 12px; }
.site-todo-editor h3 { margin: 0 0 8px; font-size: 15px; color: #17241f; }
.site-todo-row { display: grid; grid-template-columns: 22px minmax(0,1fr) 94px 46px; gap: 7px; align-items: center; padding: 8px 0; border-bottom: 1px solid #edf1f6; }
.site-todo-row > span { color: #8a97a5; font-family: monospace; font-size: 10px; }
.site-todo-row > a { color: #263238; font-size: 12px; line-height: 1.45; text-decoration: none; }
.site-todo-row > a:hover { color: #a44737; }
.site-todo-row select { border: 1px solid #dce4ee; border-radius: 6px; padding: 5px; font-size: 10px; background: #fff; }
.site-todo-row button { border: 1px solid #f0d7d2; background: #fff7f5; color: #a44737; border-radius: 6px; padding: 5px; font-size: 10px; }
@media (max-width: 800px) {
  .site-competition-row { grid-template-columns: 24px 66px minmax(0,1fr); }
  .site-competition-source { grid-column: 3; text-align: left; }
  .site-todo-row { grid-template-columns: 18px minmax(0,1fr) 84px 42px; }
}


/* 站点设置 */
.settings-panel { margin-bottom: 16px; }
.settings-panel-head h2 { margin: 0; font-size: 20px; color: #17241f; }
.settings-panel-head p { margin: 5px 0 14px; color: #8a97a5; font-size: 12px; line-height: 1.6; }
.settings-theme-list { display: flex; flex-wrap: wrap; gap: 8px; }
.settings-theme-btn { border: 1px solid #dce4ee; background: #fff; border-radius: 10px; padding: 10px 14px; min-width: 100px; text-align: left; font-size: 12px; color: #59697a; }
.settings-theme-btn b { display: block; font-size: 13px; color: #17241f; margin-bottom: 3px; }
.settings-theme-btn:hover, .settings-theme-btn.active { border-color: #1f3b33; background: #f4f8f6; color: #1f3b33; }
.settings-links { display: flex; flex-wrap: wrap; gap: 8px; }
.settings-links a { border: 1px solid #dce4ee; background: #fbfcfe; border-radius: 8px; padding: 10px 13px; color: #285547; font-size: 12px; text-decoration: none; }
.settings-links a:hover { border-color: #4d7c6b; background: #f4f8f6; }


/* 资料卡编辑器 */
.res-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; border: 1px solid #dce4ee; border-radius: 9px; background: #f8fafc; }
.res-add-btn { border: 1px solid #1f3b33; background: #1f3b33; color: #fff; border-radius: 8px; padding: 8px 11px; font-size: 11px; font-weight: 650; }
.res-add-btn:hover { background: #2c5145; }
.res-toolbar-hint { color: #8a97a5; font-size: 10px; }
.res-progress { margin-top: 8px; padding: 9px 10px; border: 1px solid #dce4ee; border-radius: 8px; background: #fff; }
.res-progress-track { height: 7px; border-radius: 999px; background: #edf1f6; overflow: hidden; }
.res-progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #4d7c6b, #a44737); transition: width .2s ease; }
.res-progress-text { margin-top: 5px; color: #59697a; font-size: 10px; }
.res-cards { display: grid; gap: 9px; margin-top: 9px; }
.res-empty { padding: 14px; border: 1px dashed #cfdae6; border-radius: 9px; color: #8a97a5; font-size: 11px; text-align: center; }
.res-card { border: 1px solid #dce4ee; border-radius: 10px; background: #fff; padding: 10px 11px; }
.res-card:hover { border-color: #b9cbd9; }
.res-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.res-kind { color: #285547; background: #eef4f1; border-radius: 999px; padding: 2px 7px; font-family: monospace; font-size: 9px; }
.res-kind.file { color: #8a5a2b; background: #f8efe3; }
.res-remove { border: 1px solid #f0d7d2; background: #fff7f5; color: #a44737; border-radius: 6px; padding: 4px 7px; font-size: 10px; }
.res-card-grid { display: grid; grid-template-columns: 1.3fr .8fr 1fr 1.6fr; gap: 7px; }
.res-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.res-field span { color: #8a97a5; font-size: 9px; }
.res-field input { width: 100%; border: 1px solid #e1e8f0; border-radius: 6px; padding: 7px 8px; font-size: 11px; min-width: 0; }
.res-field input:focus { outline: none; border-color: #4d7c6b; box-shadow: 0 0 0 2px rgba(77,124,107,.1); }
.res-card-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; color: #8a97a5; font-size: 9px; }
.res-card-foot a { color: #285547; text-decoration: none; }
.res-card-foot a:hover { text-decoration: underline; }

/* URL 资料小卡 */
.res-modal-mask { position: fixed; inset: 0; z-index: 200; background: rgba(16,26,21,.42); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 18px; }
.res-modal-card { width: min(560px, 100%); background: #fff; border: 1px solid #dce4ee; border-radius: 14px; padding: 19px; box-shadow: 0 24px 70px rgba(16,26,21,.2); }
.res-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.res-modal-kicker { margin: 0; color: #a44737; font-family: monospace; font-size: 8px; letter-spacing: 1.2px; }
.res-modal-head h3 { margin: 5px 0 3px; font-size: 20px; }
.res-modal-head p { margin: 0; color: #8a97a5; font-size: 10px; line-height: 1.5; }
.res-modal-close { border: 0; background: transparent; color: #8a97a5; font-size: 22px; line-height: 1; }
.res-modal-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.res-modal-field span { color: #59697a; font-size: 10px; font-weight: 600; }
.res-modal-field input, .res-modal-field select { width: 100%; border: 1px solid #dce4ee; border-radius: 7px; padding: 9px 10px; font-size: 12px; font-family: inherit; }
.res-modal-field input:focus, .res-modal-field select:focus { outline: none; border-color: #4d7c6b; box-shadow: 0 0 0 3px rgba(77,124,107,.1); }
.res-modal-two { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.res-modal-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #edf1f6; }
.res-cancel { border: 1px solid #dce4ee; background: #fff; border-radius: 8px; padding: 9px 12px; font-size: 11px; color: #59697a; }
@media (max-width: 800px) {
  .res-card-grid { grid-template-columns: 1fr 1fr; }
  .res-title, .res-url { grid-column: 1 / -1; }
  .res-modal-two { grid-template-columns: 1fr; }
  .res-toolbar-hint { flex-basis: 100%; }
}
