/* 管理后台 CMS：左侧常驻导航 + 右侧工作区，沿用看板的暗色变量 */
.cms-shell { display: flex; min-height: 100vh; }
.cms-side {
  width: 232px; flex: 0 0 232px; padding: 20px 14px;
  background: rgba(5, 15, 26, .96); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.cms-logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.cms-logo .brand-mark { width: 34px; height: 34px; }
.cms-logo strong { font-size: 15px; color: #e7f8ff; }
.cms-logo span { display: block; font-size: 11px; color: #66839a; margin-top: 2px; }
.cms-nav button {
  width: 100%; text-align: left; border: 0; background: transparent; color: #89a4ba;
  padding: 10px 12px; border-radius: 8px; font-size: 13px;
}
.cms-nav button:hover { background: rgba(40,184,230,.1); color: #dff8ff; }
.cms-nav button.active { background: #123650; color: #e7f8ff; border-left: 3px solid var(--cyan); padding-left: 9px; }
.cms-nav-sep { margin: 14px 8px 6px; font-size: 11px; color: #5c7890; letter-spacing: .1em; }
.cms-side-foot { margin-top: auto; padding: 14px 8px 4px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.cms-side-foot a { font-size: 12px; color: #8fb3c9; }
.cms-side-foot button { font-size: 12px; padding: 7px 10px; }
.cms-main { flex: 1; min-width: 0; padding: 24px 28px 60px; }
.cms-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.cms-head h2 { margin: 0; font-size: 22px; color: #e7f8ff; }
.cms-head p { margin: 6px 0 0; font-size: 13px; color: var(--muted); line-height: 1.6; max-width: 760px; }
.cms-head .who { font-size: 12px; color: #8fb3c9; }
.cms-grid { display: grid; gap: 14px; }
.cms-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cms-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cms-grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cms-card { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.cms-card h3 { margin: 0 0 6px; font-size: 15px; color: #e7f8ff; }
.cms-card > p { margin: 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
.cms-stat { display: flex; flex-direction: column; gap: 4px; }
.cms-stat span { font-size: 12px; color: var(--muted); }
.cms-stat strong { font-size: 24px; color: #dff8ff; line-height: 1.2; }
.cms-stat i { font-style: normal; font-size: 11px; color: #6f8ba2; }
.cms-section { margin-top: 18px; }
.cms-section > h3 { margin: 0 0 10px; font-size: 15px; color: #e7f8ff; }
.cms-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.cms-toolbar .field { min-width: 150px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #9ab3c6; }
.field input, .field select, .field textarea {
  color: #dce8f3; background: #0b1d2e; border: 1px solid var(--line); border-radius: 7px; padding: 9px 11px; font-size: 13px; width: 100%;
}
.field textarea { min-height: 84px; resize: vertical; line-height: 1.6; }
.field input[type="checkbox"] { width: auto; }
.field.check { flex-direction: row; align-items: center; gap: 7px; font-size: 13px; color: #c5d7e6; }
.field.check input { width: 15px; height: 15px; }
.cms-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.cms-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.cms-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.cms-table th { text-align: left; padding: 11px 12px; color: #8fb3c9; font-weight: 600; border-bottom: 1px solid var(--line); white-space: nowrap; }
.cms-table td { padding: 10px 12px; border-bottom: 1px solid rgba(126,162,190,.08); color: #c5d7e6; vertical-align: middle; }
.cms-table tr:last-child td { border-bottom: 0; }
.cms-table tr:hover td { background: rgba(40,184,230,.04); }
.cms-table td.num, .cms-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.cms-table a { color: var(--cyan); }
.cms-table .repo-name { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cms-table .muted { color: var(--muted); }
.cms-inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cms-inline input, .cms-inline select { padding: 6px 8px; font-size: 12px; }
.cms-note { font-size: 12px; line-height: 1.65; color: #8fb3c9; margin: 10px 0 0; }
.cms-note.warn { color: var(--warn); }
.cms-toast { position: fixed; right: 24px; bottom: 24px; z-index: 60; max-width: 420px; padding: 12px 16px; border-radius: 9px; font-size: 13px; box-shadow: 0 12px 40px rgba(0,0,0,.4); }
.cms-toast.ok { background: #0f3a33; color: #b9f4e2; border: 1px solid rgba(45,212,168,.5); }
.cms-toast.error { background: #3a1820; color: #ffc4cc; border: 1px solid rgba(255,93,108,.5); }
.cms-login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.cms-login-card { width: min(420px, 100%); padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.cms-login-card h1 { margin: 0 0 6px; font-size: 20px; }
.cms-login-card p { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0 0 18px; }
.cms-login-card .field { margin-bottom: 14px; }
.cms-login-card button { width: 100%; }
.cms-modal-mask { position: fixed; inset: 0; background: rgba(2,8,15,.76); z-index: 50; display: grid; place-items: center; padding: 20px; }
.cms-modal { width: min(680px, 100%); max-height: 86vh; overflow-y: auto; padding: 22px 24px; border: 1px solid var(--line); border-radius: 14px; background: #0c1d2e; }
.cms-modal h3 { margin: 0 0 4px; font-size: 17px; }
.cms-modal .sub { margin: 0 0 16px; font-size: 12px; color: var(--muted); word-break: break-all; }
.cms-modal .field { margin-bottom: 12px; }
.cms-modal .cms-actions { justify-content: flex-end; }
.cms-loading { padding: 40px; text-align: center; color: var(--muted); font-size: 13px; }
.cms-tag { display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: 11px; background: rgba(40,184,230,.12); color: var(--cyan); margin-right: 4px; }
.cms-tag.off { background: rgba(255,93,108,.12); color: #ff8b96; }
.cms-tag.on { background: rgba(45,212,168,.12); color: var(--ok); }
@media (max-width: 1000px) {
  .cms-shell { flex-direction: column; }
  .cms-side { width: 100%; flex: none; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .cms-side .cms-nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .cms-nav button { width: auto; }
  .cms-side-foot { margin: 0 0 0 auto; flex-direction: row; }
  .cms-grid.c2, .cms-grid.c3, .cms-grid.c4 { grid-template-columns: 1fr 1fr; }
  .cms-main { padding: 18px 14px 40px; }
}
