/* X17 auth 主题层 · 白底（light）覆盖
 *
 * 深色仍是各页 :root 的默认值；本文件只在 <html data-theme="light"> 时覆盖变量。
 * 选择器 :root[data-theme="light"] 特异性高于各页的 :root，故加载顺序无关。
 * 新增页面只需 <link rel="stylesheet" href="assets/theme.css"> + theme.js。
 */

:root[data-theme="light"]{
  /* 基础面 */
  --bg:#f5f7fa; --panel:#ffffff; --panel2:#fafbfc;
  --line:#e3e7ec; --line2:#cfd6df;
  --txt:#1b2028; --dim:#5f6b7a;
  --brand:#2f6df6; --ok:#1e9e52; --warn:#b8791a; --danger:#c93b3b; --purple:#7a52d1;

  /* 强调/链接 */
  --link:#1f5fd0; --linkbd:#b9cdf2; --linkbg:#eaf1fe;

  /* 输入与代码块 */
  --input:#f7f9fb; --code:#eef1f5; --toast:#ffffff;
  --mockbg:#f2f5fa; --mockbd:#c9d5e8;

  /* 语义块 */
  --okbg:#e8f7ee; --okbd:#b7e3c7; --okfg:#1a7f45;
  --okbg2:#eaf6ee; --okbd2:#c2e3cd;
  --warnbg:#fdf5e3; --warnbd:#eed9a6; --warnfg:#8a5a10; --warnhover:#fbefd8;
  --dangerbg:#fdeceb; --dangerbd:#f0c2c0; --dangerfg:#b3372f;
  --purbg:#f3edfd; --purbd:#d9c7f5;
  --infobg:#e8f0fe; --infobd:#bfd4f7; --infofg:#1a5fb4;

  /* 层次 */
  --cardsub:#f0f2f5; --inset:#f7f9fb; --rowhover:#f2f5f9;

  color-scheme: light;
}

/* 亮色下需要补的细节（深色无需） */
:root[data-theme="light"] .toast{box-shadow:0 8px 28px rgba(24,33,48,.14)}
:root[data-theme="light"] .qrbox{box-shadow:inset 0 0 0 1px var(--line)}
:root[data-theme="light"] .app.off{opacity:.72}
:root[data-theme="light"] .mockbar{box-shadow:none}

/* ===== 通用页头（标题在左、操作在右，如 dict.php） ===== */
.pagehd{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 6px}
.pagehd h1{margin:0}

/* ===== 主题切换按钮（各页顶栏共用，类名 themebtn） ===== */
.themebtn{
  display:inline-flex;align-items:center;justify-content:center;
  height:28px;padding:0 10px;border-radius:7px;cursor:pointer;
  border:1px solid var(--line);background:transparent;color:var(--dim);
  font:inherit;font-size:12px;line-height:1;white-space:nowrap;
  -webkit-appearance:none;appearance:none;
}
.themebtn:hover{color:var(--txt);border-color:var(--line2)}
.themebtn:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
