/* ============================================================
   GitPress 个人版后台 — Dev-Tool 暗色设计系统
   参照 designskill.qiaomu.ai 组件页:近黑底、琥珀主色、
   JetBrains Mono 数值、大写微标签、3-6px 小圆角、密集排版。
   默认暗色(同时支持跟随系统),可手动切浅色。
   ============================================================ */

:root {
  --bg: #0f0f0f;
  --surface: #181818;
  --surface-2: #202020;
  --hover: #242424;
  --line: #2a2a2a;
  --line-mid: #333;

  --amber: #f5a623;
  --amber-hover: #fbb84a;
  --amber-dim: rgba(245, 166, 35, 0.12);
  --amber-glow: rgba(245, 166, 35, 0.08);

  --accent-ink: #f5a623;          /* 文字强调 */
  --accent-fill: #f5a623;         /* 主按钮底 */
  --on-accent: #0f0f0f;           /* 主按钮文字(琥珀底黑字) */
  --accent-soft: rgba(245, 166, 35, 0.12);

  --red: #e5533d;
  --red-dim: rgba(229, 83, 61, 0.12);
  --green: #3dba6e;
  --green-dim: rgba(61, 186, 110, 0.12);
  --blue: #4d9ef5;

  --ink: #e8e8e8;
  --ink-2: #c0c0c0;
  --muted: #9a9a9a;
  --dim: #6e6e6e;

  --ok: #3dba6e;   --ok-soft: var(--green-dim);
  --err: #e5533d;  --err-soft: var(--red-dim);
  --warn: #f5a623; --warn-soft: var(--amber-dim);

  --ring: rgba(245, 166, 35, 0.35);
  --radius: 6px;
  --radius-sm: 4px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 12px 40px rgba(0, 0, 0, 0.55);
}

/* 手动浅色模式:同构映射,主按钮仍是琥珀底黑字 */
[data-theme="light"] {
  --bg: #f4f3f0;
  --surface: #ffffff;
  --surface-2: #faf9f7;
  --hover: #eeece8;
  --line: #e2e0db;
  --line-mid: #cfcac2;

  --amber: #f5a623;
  --amber-hover: #ffbe4d;
  --amber-dim: rgba(245, 166, 35, 0.14);
  --amber-glow: rgba(245, 166, 35, 0.08);

  --accent-ink: #a06a00;
  --accent-fill: #f5a623;
  --on-accent: #141414;
  --accent-soft: rgba(245, 166, 35, 0.15);

  --red: #d3452f;   --red-dim: rgba(211, 69, 47, 0.10);
  --green: #1e9e55; --green-dim: rgba(30, 158, 85, 0.10);
  --blue: #2478d9;

  --ink: #1c1c1c;
  --ink-2: #383838;
  --muted: #6d6d6d;
  --dim: #9a9a9a;

  --ok: #1e9e55;  --ok-soft: var(--green-dim);
  --err: #d3452f; --err-soft: var(--red-dim);
  --warn: #9a6a00; --warn-soft: var(--amber-dim);

  --ring: rgba(245, 166, 35, 0.4);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-2: 0 12px 36px rgba(0, 0, 0, 0.16);
}

/* 系统偏好浅色且未手动指定时,用浅色令牌 */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f3f0;
    --surface: #ffffff;
    --surface-2: #faf9f7;
    --hover: #eeece8;
    --line: #e2e0db;
    --line-mid: #cfcac2;
    --amber-hover: #ffbe4d;
    --amber-dim: rgba(245, 166, 35, 0.14);
    --amber-glow: rgba(245, 166, 35, 0.08);
    --accent-ink: #a06a00;
    --accent-fill: #f5a623;
    --on-accent: #141414;
    --accent-soft: rgba(245, 166, 35, 0.15);
    --red: #d3452f;   --red-dim: rgba(211, 69, 47, 0.10);
    --green: #1e9e55; --green-dim: rgba(30, 158, 85, 0.10);
    --blue: #2478d9;
    --ink: #1c1c1c;
    --ink-2: #383838;
    --muted: #6d6d6d;
    --dim: #9a9a9a;
    --ok: #1e9e55;  --ok-soft: var(--green-dim);
    --err: #d3452f; --err-soft: var(--red-dim);
    --warn: #9a6a00; --warn-soft: var(--amber-dim);
    --ring: rgba(245, 166, 35, 0.4);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-2: 0 12px 36px rgba(0, 0, 0, 0.16);
  }
}

/* ---- 基础 ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .gp-mono, .gp-codeblock, .gp-acc-token {
  font-family: 'JetBrains Mono', ui-monospace, "SF Mono", Consolas, "Courier New", monospace;
}
code {
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0 5px;
  border-radius: 3px;
  font-size: 0.86em;
  color: var(--amber);
}
h1, h2, h3 { line-height: 1.3; letter-spacing: -0.01em; }
.gp-i { width: 16px; height: 16px; flex: none; }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 3px; }
button, .btn, .gp-linklike, select, summary { cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* 大写微标签(参考页的 section 标签语言) */
.gp-micro {
  display: block;
  font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 4px;
}

/* ---- 布局骨架 ---- */
.gp-shell { display: flex; min-height: 100vh; }
.gp-side {
  width: 224px;
  flex: none;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 14px 10px 12px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.gp-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 14px;
  color: inherit;
}
.gp-brand:hover { text-decoration: none; }
.gp-brand-mark {
  width: 32px; height: 32px; flex: none;
  border-radius: 6px;
  background: var(--amber);
  color: #141414;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: 17px;
  display: inline-flex; align-items: center; justify-content: center;
}
.gp-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.gp-brand-text b { font-size: 15px; font-weight: 700; }
.gp-brand-text i {
  font-style: normal;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gp-nav { display: flex; flex-direction: column; gap: 1px; }
.gp-nav-group-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 12px 10px 5px;
}
.gp-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.gp-nav-item:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.gp-nav-item.is-active {
  background: var(--amber-dim);
  color: var(--amber);
  border-color: rgba(245, 166, 35, 0.2);
}

.gp-side-foot {
  margin-top: auto;
  padding: 12px 8px 2px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--muted);
}
.gp-user { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.gp-iconbtn {
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.gp-iconbtn:hover { background: var(--hover); }
.gp-iconbtn .gp-i { width: 15px; height: 15px; }
:root:not([data-theme="dark"]) .gp-theme-moon { display: none; }
[data-theme="dark"] .gp-theme-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .gp-theme-sun { display: none; }
  :root:not([data-theme="dark"]) .gp-theme-moon { display: inline-flex; }
}
[data-theme="light"] .gp-theme-moon { display: none; }
[data-theme="light"] .gp-theme-sun { display: inline-flex; }

.gp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 20px 26px 24px; }
.gp-top {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.gp-top-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.gp-top-title h1 { font-size: 18px; font-weight: 700; margin: 0; }
.gp-site-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600;
  color: var(--amber);
  background: var(--amber-dim);
  border: 1px solid rgba(245, 166, 35, 0.25);
  border-radius: 3px;
  padding: 2px 9px;
  max-width: 220px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gp-site-chip .gp-i { width: 12px; height: 12px; }
.gp-top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gp-site-switch { display: flex; align-items: center; gap: 8px; }
.gp-site-switch select { width: auto; max-width: 200px; padding: 6px 10px; font-size: 12.5px; min-height: 36px; }
.gp-content { display: flex; flex-direction: column; gap: 14px; }
.gp-foot {
  margin-top: 26px; padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--dim); font-size: 11.5px; text-align: center;
}
.gp-visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

/* ---- 卡片 ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.card h2 { font-size: 15px; font-weight: 700; margin: 0 0 10px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card h2 .gp-muted { font-weight: 400; }
.card.gp-pad0 { padding: 0; overflow: hidden; }
.gp-narrow { max-width: 470px; }
.gp-narrow-wide { max-width: 780px; }

.gp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 12px; }
.gp-stat { display: flex; flex-direction: column; gap: 1px; padding: 16px 18px; }
.gp-stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 21px; font-weight: 600; color: var(--amber);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gp-stat-label { color: var(--muted); font-size: 12px; }
.gp-stat-link { margin-top: 7px; font-size: 12px; font-weight: 600; }

.gp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.gp-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
.gp-grid-inner { display: flex; flex-direction: column; gap: 4px; justify-content: center; }

/* ---- 表单 ---- */
.gp-form { display: flex; flex-direction: column; gap: 8px; }
.field { display: flex; flex-direction: column; gap: 5px; padding: 5px 0; }
.field-label { font-weight: 600; font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
input[type="text"], input[type="password"], input[type="number"], input[type="datetime-local"],
select, textarea {
  border: 1px solid var(--line-mid);
  border-radius: 4px;
  padding: 8px 11px;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  background: var(--surface-2);
  width: 100%;
  min-height: 44px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; min-height: 0; }
input::placeholder, textarea::placeholder { color: var(--dim); }
input:hover, select:hover, textarea:hover { border-color: var(--dim); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--ring);
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--amber); width: 15px; height: 15px; }
.gp-checkfield { flex-direction: row; align-items: center; gap: 9px; padding: 7px 0; }
.gp-checkfield span { font-size: 13px; color: var(--ink-2); }

.gp-choice { border: 0; padding: 0; margin: 4px 0 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gp-choice-item {
  display: flex; gap: 11px; align-items: flex-start;
  border: 1px solid var(--line-mid);
  border-radius: 4px;
  padding: 12px 13px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.gp-choice-item:hover { border-color: var(--dim); }
.gp-choice-item:has(input:checked) { border-color: var(--amber); background: var(--amber-glow); }
.gp-choice-item input { margin-top: 3px; }
.gp-choice-item span { font-size: 13px; color: var(--muted); line-height: 1.5; }
.gp-choice-item b { color: var(--ink); font-size: 13.5px; }
.gp-choice-item i { font-style: normal; color: var(--dim); font-size: 12px; }

/* ---- 按钮(参考页:mono 字体、全大写、琥珀底黑字、hover 上浮) ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line-mid);
  background: transparent;
  color: var(--muted);
  padding: 7px 14px;
  min-height: 36px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover { background: var(--hover); color: var(--ink); border-color: var(--dim); text-decoration: none; }
.btn .gp-i { width: 13px; height: 13px; }
.btn-primary { background: var(--amber); border-color: var(--amber); color: var(--on-accent); }
.btn-primary:hover { background: var(--amber-hover); border-color: var(--amber-hover); color: var(--on-accent); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { border-color: transparent; }
.btn-danger-ghost { border-color: transparent; color: var(--err); }
.btn-danger-ghost:hover { background: var(--err-soft); border-color: rgba(229, 83, 61, 0.3); color: var(--err); }
.btn-sm { padding: 4px 10px; min-height: 30px; font-size: 10.5px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.gp-btnrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.gp-linklike { background: none; border: 0; color: var(--accent-ink); font: inherit; font-size: 12.5px; padding: 0; }
.gp-linklike:hover { text-decoration: underline; }
.gp-inline-form { display: inline; }
.gp-listhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.gp-details { border: 1px dashed var(--line-mid); border-radius: 4px; padding: 9px 13px; margin: 6px 0; }
.gp-details summary {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
}
.gp-details summary:hover { color: var(--ink); }

/* ---- 表格 ---- */
.gp-table { width: 100%; border-collapse: collapse; }
.gp-table th, .gp-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}
.gp-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--dim);
  background: var(--surface-2);
}
.gp-table tr:last-child td { border-bottom: 0; }
.gp-table tbody tr { transition: background 0.12s; }
.gp-table tbody tr:hover { background: var(--hover); }
.gp-row-title { font-weight: 600; color: var(--ink); font-size: 13.5px; }
.gp-tar { text-align: right; }
.gp-nowrap { white-space: nowrap; }
.gp-act {
  color: var(--accent-ink);
  background: none; border: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600;
  padding: 3px 6px;
  border-radius: 3px;
  transition: background 0.15s;
}
.gp-act:hover { background: var(--amber-dim); text-decoration: none; }
.gp-act-danger { color: var(--err); }
.gp-act-danger:hover { background: var(--err-soft); }

/* ---- 徽章与提示 ---- */
.badge {
  display: inline-flex; align-items: center;
  padding: 1px 8px;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.8;
  border: 1px solid transparent;
}
.badge-ok { background: var(--green-dim); color: var(--green); border-color: rgba(61, 186, 110, 0.25); }
.badge-err { background: var(--red-dim); color: var(--red); border-color: rgba(229, 83, 61, 0.25); }
.badge-warn { background: var(--amber-dim); color: var(--amber); border-color: rgba(245, 166, 35, 0.25); }
.badge-accent { background: var(--amber-dim); color: var(--amber); border-color: rgba(245, 166, 35, 0.25); }

.gp-flashes { margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
.gp-flash {
  padding: 10px 14px;
  border-radius: 4px;
  border: 1px solid;
  border-left-width: 3px;
  font-size: 13px;
}
.gp-flash-ok { background: var(--green-dim); color: var(--ink); border-color: rgba(61, 186, 110, 0.25); border-left-color: var(--green); }
.gp-flash-err { background: var(--red-dim); color: var(--ink); border-color: rgba(229, 83, 61, 0.3); border-left-color: var(--red); }
.gp-flash-warn { background: var(--amber-dim); color: var(--ink); border-color: rgba(245, 166, 35, 0.3); border-left-color: var(--amber); }
.gp-err-text { color: var(--err); font-size: 13px; }

/* ---- 媒体库 ---- */
.gp-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.gp-media-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  display: flex; flex-direction: column; gap: 5px;
  transition: border-color 0.15s, transform 0.15s;
}
.gp-media-item:hover { border-color: var(--dim); transform: translateY(-1px); }
.gp-media-thumb {
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
}
.gp-media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gp-media-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; font-weight: 500;
  word-break: break-all;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gp-media-acts { display: flex; gap: 2px; margin-top: 2px; }
.gp-upload-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.gp-upload-row input[type="file"] { flex: 1; min-width: 240px; font-size: 13px; }

/* ---- 编辑器 ---- */
.gp-editor-card { padding: 14px 16px; }
.gp-editor-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.gp-editor-textarea {
  min-height: 440px;
  font-family: 'JetBrains Mono', ui-monospace, Consolas, "Courier New", monospace;
  font-size: 13.5px;
  line-height: 1.75;
  border: 0;
  padding: 0;
  width: 100%;
  background: transparent;
  color: var(--ink);
}
.gp-editor-textarea:focus { box-shadow: none; border-color: transparent; }
.gp-editor-textarea.gp-hidden { display: none; }
.gp-savebar { margin-top: 2px; }
.gp-saved-tip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 13px;
  background: var(--amber-dim);
  border: 1px solid rgba(245, 166, 35, 0.3);
  border-radius: 4px;
  font-size: 12.5px;
  color: var(--ink);
  margin-bottom: 12px;
}

/* ---- Markdown 预览 ---- */
.gp-preview { border-top: 1px solid var(--line); padding: 14px 2px 0; min-height: 440px; max-width: 760px; }
.gp-preview h1, .gp-preview h2, .gp-preview h3, .gp-preview h4 { margin: 1em 0 0.4em; }
.gp-preview h1 { font-size: 1.6em; } .gp-preview h2 { font-size: 1.35em; }
.gp-preview h3 { font-size: 1.15em; } .gp-preview h4 { font-size: 1.02em; }
.gp-preview p { margin: 0.6em 0; }
.gp-preview pre { background: var(--surface-2); border: 1px solid var(--line); padding: 12px; border-radius: 4px; overflow-x: auto; font-size: 12.5px; }
.gp-preview code { background: none; border: 0; padding: 0; color: var(--amber); }
.gp-preview blockquote { border-left: 3px solid var(--line-mid); margin: 0.6em 0; padding: 2px 14px; color: var(--muted); }
.gp-preview img { max-width: 100%; border-radius: 4px; }
.gp-preview ul, .gp-preview ol { padding-left: 1.6em; }

/* ---- 弹窗 ---- */
.gp-modal {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 0, 0, 0.62);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.gp-modal-box {
  background: var(--surface);
  border: 1px solid var(--line-mid);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  max-width: 760px; width: 100%; max-height: 82vh;
  display: flex; flex-direction: column;
}
.gp-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.gp-modal-body { padding: 12px 18px 18px; overflow-y: auto; }
.gp-modal-body .gp-media-acts { display: none; }
.gp-hidden { display: none !important; }

/* ---- 登录 / 安装 ---- */
.gp-bare-wrap { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 9vh 16px; }
.gp-auth-card {
  background: var(--surface);
  border: 1px solid var(--line-mid);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  padding: 32px 32px 28px;
  width: 100%; max-width: 400px;
}
.gp-auth-head { text-align: center; margin-bottom: 14px; }
.gp-auth-head h2 { margin: 13px 0 4px; font-size: 18px; }
.gp-auth-logo {
  width: 44px; height: 44px; border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 23px;
  background: var(--amber);
  color: #141414;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
}

/* ---- 站点管理 ---- */
.gp-site-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.gp-site-card { display: flex; flex-direction: column; gap: 9px; }
.gp-site-card.is-current { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber); }
.gp-site-card-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.gp-site-label { font-size: 15px; font-weight: 700; }
.gp-site-link { margin-left: auto; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.gp-site-link .gp-i { width: 12px; height: 12px; }
.gp-site-meta { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; font-size: 12.5px; }
.gp-site-meta dt { color: var(--dim); white-space: nowrap; }
.gp-site-meta dd { margin: 0; overflow-wrap: anywhere; }

/* ---- GitHub 账号 ---- */
.gp-card-head-row { display: flex; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.gp-card-head-row h2 { margin: 0; font-size: 15px; }
.gp-why { max-width: 520px; line-height: 1.7; margin: 0; }
.gp-acc-list { display: flex; flex-direction: column; gap: 12px; }
.gp-acc-card { display: flex; flex-direction: column; gap: 6px; }
.gp-acc-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gp-acc-label { font-size: 15px; font-weight: 700; }
.gp-acc-login { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 600; }
.gp-acc-token {
  font-size: 11.5px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 3px;
}
.gp-acc-sites { margin-left: auto; font-size: 12px; color: var(--muted); }
.gp-acc-sites b { color: var(--amber); font-family: 'JetBrains Mono', monospace; }
.gp-acc-lock { margin-left: auto; }
.gp-acc-edit { border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 6px; }

/* ---- 杂项 ---- */
.gp-muted { color: var(--muted); }
.gp-small { font-size: 12px; }
.gp-empty {
  text-align: center; padding: 46px 18px;
  background: var(--surface);
  border: 1px dashed var(--line-mid);
  border-radius: var(--radius);
}
.gp-empty h2 { margin: 6px 0; font-size: 15px; }
.gp-start { max-width: 660px; }
.gp-steps { padding-left: 20px; display: flex; flex-direction: column; gap: 13px; margin: 14px 0; }
.gp-steps li { margin: 0; }
.gp-codeblock {
  background: #0a0b0d;
  border: 1px solid var(--line);
  color: #d8d3c8;
  padding: 14px 16px;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.65;
  margin: 0;
}
[data-theme="light"] .gp-codeblock { background: #1a1815; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .gp-codeblock { background: #1a1815; }
}
.gp-scratch { width: 100%; font-size: 13.5px; }

/* ---- 响应式 ---- */
@media (max-width: 960px) {
  .gp-shell { flex-direction: column; }
  .gp-side {
    width: 100%; height: auto; position: static;
    border-right: 0; border-bottom: 1px solid var(--line);
    padding: 10px 12px;
    flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px;
  }
  .gp-brand { padding: 0 8px 0 0; }
  .gp-nav { flex-direction: row; flex-wrap: wrap; gap: 2px; }
  .gp-nav-item span { display: none; }
  .gp-nav-item { padding: 8px 10px; }
  .gp-nav-group-label { display: none; }
  .gp-side-foot { margin-top: 0; margin-left: auto; border-top: 0; padding: 0; }
  .gp-main { padding: 14px 14px 20px; }
  .gp-grid-2, .gp-grid-3, .gp-choice { grid-template-columns: 1fr; }
  .gp-top { align-items: flex-start; }
  .gp-top-actions { margin-left: 0; width: 100%; }
}
@media (max-width: 560px) {
  .gp-site-cards { grid-template-columns: 1fr; }
  .gp-table { display: block; overflow-x: auto; }
  .gp-acc-sites, .gp-acc-lock { margin-left: 0; }
}
