/* =========================================================================
   Semi 风格 · 深色/浅色双主题 — 资料下载平台 · 同步镜像
   设计令牌参照 Semi Design 规范：
   - 深色为基底（:root，也是无 JS 时的兜底）；浅色覆盖块在文件末尾 [data-theme="light"]
   - 背景分层 bg0(页) < bg1(卡片) < bg2(浮层) < bg3(hover)；层级靠背景+描边+阴影表达
   - 圆角/动效曲线按组件语义统一；交互态: hover / active / focus-ring / disabled
   注意：JS 内联引用了 var(--muted) / var(--ok) / var(--accent)，不可改名。
   ========================================================================= */
:root {
  color-scheme: dark;
  --bg0: #121317;
  --bg1: #1a1c22;
  --bg2: #20232b;
  --bg3: #272b34;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #e9ecf2;
  --muted: #9aa2b0;
  --faint: #69707f;
  --accent: #4c8dff;
  --accent-hi: #6fa5ff;
  --accent-lo: #3577e8;
  --accent-weak: rgba(76, 141, 255, .14);
  --accent-glow: rgba(76, 141, 255, .35);
  --ok: #37c988;
  --ok-weak: rgba(55, 201, 136, .14);
  --danger: #ff7a72;
  --danger-weak: rgba(255, 90, 84, .14);
  --warn: #f5b544;
  --warn-weak: rgba(245, 181, 68, .14);
  --r-s: 6px;
  --r-m: 9px;
  --r-l: 12px;
  --ring: 0 0 0 3px rgba(76, 141, 255, .22);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 28px rgba(0, 0, 0, .18);
  --shadow-pop: 0 12px 36px rgba(0, 0, 0, .42), 0 3px 8px rgba(0, 0, 0, .3);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(.2, .8, .3, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--bg0); }
body {
  background:
    radial-gradient(1100px 460px at 50% -12%, rgba(76, 141, 255, .10), transparent 62%),
    var(--bg0);
  background-attachment: fixed;
  color: var(--text);
  font: 14px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(76, 141, 255, .34); }

/* 滚动条 */
* { scrollbar-width: thin; scrollbar-color: #3a3f4b transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #3a3f4b; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: #4b5262; }
::-webkit-scrollbar-corner { background: transparent; }

/* 可交互元素的统一过渡 */
button, .frow, input, select, a {
  transition: background-color .16s var(--ease), border-color .16s var(--ease),
              color .16s var(--ease), box-shadow .16s var(--ease),
              opacity .16s var(--ease), transform .12s var(--ease);
}
button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none !important; }
button:not(:disabled):active { transform: translateY(1px); }
:focus-visible { outline: none; box-shadow: var(--ring); }
input:focus-visible, select:focus-visible { box-shadow: none; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(22, 24, 29, .82);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  max-width: 1080px; margin: 0 auto; padding: 10px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; color: inherit; cursor: pointer; }
.brand:hover { opacity: .92; }
.logo {
  width: 40px; height: 40px; border-radius: 11px; flex: 0 0 auto;
  object-fit: contain;
  background: linear-gradient(135deg, #3d7bf3, #7c6cff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 4px 14px rgba(76, 100, 255, .35);
}
.brand h1 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: .2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand .sub { font-size: 12px; color: var(--faint); margin-top: 1px; }
.meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#authBox { display: inline-flex; align-items: center; gap: 8px; }

/* 胶囊 chip */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, .07); color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 12px; font-size: 12px; white-space: nowrap;
}
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
.chip.updated { background: var(--ok-weak); border-color: rgba(55, 201, 136, .3); color: #5fd8a2; }
.chip.user-chip { background: rgba(76, 141, 255, .13); border-color: rgba(76, 141, 255, .28); color: #9cc3ff; }

/* ---------------- 按钮 ---------------- */
.btn-ghost {
  background: transparent; border: 1px solid var(--line-strong); color: var(--text);
  border-radius: var(--r-m); padding: 6px 14px; cursor: pointer; font-size: 13px; line-height: 1.4;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.btn-ghost:hover { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .28); }
.btn-ghost:not(:disabled):active { background: rgba(255, 255, 255, .09); }
.btn-main {
  background: linear-gradient(180deg, #5597ff, var(--accent-lo));
  border: 1px solid rgba(122, 160, 255, .35); color: #fff;
  border-radius: var(--r-m); padding: 7px 18px; cursor: pointer; font-size: 14px; line-height: 1.4;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 2px 8px rgba(53, 119, 232, .28);
}
.btn-main:hover { background: linear-gradient(180deg, #63a2ff, #3f82ee); border-color: rgba(140, 172, 255, .5); }
.btn-main:not(:disabled):active { background: linear-gradient(180deg, #3f82ee, #2f6cd9); }
.btn-ghost.sm { padding: 3px 11px; font-size: 12px; border-radius: 7px; }
.head-actions { display: flex; gap: 8px; align-items: center; }
.drawer .btn-main { padding: 6px 13px; font-size: 13px; }
.drawer .btn-ghost { color: var(--muted); }

/* 图标按钮（主题切换） */
.icon-btn {
  width: 30px; height: 30px; padding: 0; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line-strong); color: var(--muted);
  border-radius: 9px; cursor: pointer;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-weak); }
.icon-btn:not(:disabled):active { transform: translateY(1px); }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn .icon-sun { display: block; }
.icon-btn .icon-moon { display: none; }
[data-theme="light"] .icon-btn .icon-sun { display: none; }
[data-theme="light"] .icon-btn .icon-moon { display: block; }

/* ---------------- 主内容 ---------------- */
main { max-width: 1080px; margin: 18px auto 48px; padding: 0 18px; }

/* 变更摘要条 */
.summary {
  display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline;
  background: linear-gradient(180deg, rgba(76, 141, 255, .10), rgba(76, 141, 255, .05));
  border: 1px solid rgba(76, 141, 255, .22);
  color: #c3d9ff; border-radius: var(--r-m); padding: 9px 16px; margin-bottom: 16px; font-size: 13px;
}
.summary b { color: #8fb9ff; }
.summary .add { color: #4fd59a; font-weight: 600; }
.summary .del { color: var(--danger); font-weight: 600; }

/* 面包屑 */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: 13px; margin: 2px 0 12px; color: var(--faint); }
.crumbs a { color: var(--accent); text-decoration: none; cursor: pointer; padding: 2px 3px; border-radius: 5px; }
.crumbs a:hover { background: var(--accent-weak); text-decoration: none; }
.crumbs .sep { color: #4a5160; }
.crumbs .cur { color: var(--text); font-weight: 600; }

/* 工具条 */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.count { color: var(--faint); font-size: 13px; }
#searchBox {
  flex: 0 1 300px;
  border: 1px solid var(--line-strong); background: var(--bg1); color: var(--text);
  border-radius: var(--r-m); padding: 8px 12px 8px 38px; font-size: 13px; outline: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23848fa1' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.2' y2='16.2'/></svg>");
  background-repeat: no-repeat; background-position: 12px center; background-size: 15px;
}
#searchBox::placeholder { color: var(--faint); }
#searchBox:focus { border-color: var(--accent); box-shadow: var(--ring); }
#searchBox::-webkit-search-cancel-button { -webkit-appearance: none; }

/* 文件列表 */
.filelist {
  background: var(--bg1); border: 1px solid var(--line);
  border-radius: var(--r-l); box-shadow: var(--shadow-card); overflow: hidden;
}
.frow {
  display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 54px;
  border-bottom: 1px solid rgba(255, 255, 255, .045); cursor: default;
}
.frow:last-child { border-bottom: 0; }
.frow:hover { background: rgba(255, 255, 255, .035); }
.frow.folder { cursor: pointer; }
.frow.folder:hover { background: rgba(76, 141, 255, .06); }
.ico {
  width: 32px; height: 32px; border-radius: 9px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 16px;
  background: rgba(255, 255, 255, .06); filter: saturate(.85);
}
.frow.folder .ico { background: var(--accent-weak); box-shadow: inset 0 0 0 1px rgba(76, 141, 255, .18); }
.fname { flex: 1 1 auto; min-width: 0; }
.fname .t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frow.folder .fname .t { color: #d9e7ff; }
.fname .sub { font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmeta { flex: 0 0 auto; display: flex; align-items: center; gap: 20px; color: var(--faint); font-size: 12px; }
.fsize { min-width: 78px; text-align: right; font-variant-numeric: tabular-nums; }
.fupd { min-width: 148px; text-align: right; }

/* 行内操作按钮 */
.act {
  border: 1px solid var(--line-strong); background: transparent; color: var(--text);
  border-radius: 7px; padding: 4px 12px; font-size: 13px; cursor: pointer; line-height: 1.5;
}
.act:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-weak); }
.fbtn .act.dl-now {
  border-color: rgba(76, 141, 255, .5); background: var(--accent-weak); color: #8fb9ff; font-weight: 500;
}
.fbtn .act.dl-now:hover { border-color: var(--accent); background: rgba(76, 141, 255, .24); color: #c7dcff; }

/* 标签 */
.tag-new, .tag-upd { display: inline-block; font-size: 11px; border-radius: 999px; padding: 1px 8px; margin-left: 8px; vertical-align: 1px; font-weight: 500; }
.tag-upd { background: var(--warn-weak); color: #ffcb6e; border: 1px solid rgba(245, 181, 68, .3); }
.tag-new { background: var(--ok-weak); color: #5fd8a2; border: 1px solid rgba(55, 201, 136, .3); }

.empty { text-align: center; color: var(--faint); padding: 56px 0; font-size: 14px; }
.foot { text-align: center; color: #565e6c; font-size: 12px; padding: 8px 18px 44px; }

/* ---------------- 抽屉 ---------------- */
.drawer-mask, .modal-mask {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(5, 7, 10, .6);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: fadeIn .18s ease-out;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(500px, 94vw); z-index: 61;
  background: var(--bg2); border-left: 1px solid var(--line-strong);
  box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column;
  animation: drawerIn .24s var(--ease);
}
.drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line); flex: 0 0 auto;
  background: rgba(255, 255, 255, .015);
}
.drawer-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.drawer-body { overflow: auto; padding: 14px 18px 20px; }

/* 更新记录条目 */
.hitem { border-left: 2px solid rgba(76, 141, 255, .55); padding: 2px 0 2px 14px; margin-bottom: 20px; }
.hitem time { font-weight: 600; font-variant-numeric: tabular-nums; }
.hitem .delta { font-size: 12px; color: var(--faint); margin: 3px 0 8px; }
.hitem ul { margin: 2px 0; padding-left: 18px; font-size: 12px; }
.hitem li { margin: 1px 0; }
.hitem li.add { color: #4fd59a; }
.hitem li.del { color: var(--danger); text-decoration: line-through; opacity: .9; }
.hitem li.chg { color: #ffcb6e; }
.hitem .more { color: var(--faint); font-size: 12px; }

/* 更新记录：超出预览行数的路径默认折叠，点“展开”显示全部 */
.hitem li.of { display: none; }
.hitem.open li.of { display: list-item; }
.hist-toggle {
  margin-top: 6px; border: none; background: transparent; cursor: pointer;
  color: var(--accent); font-size: 12px; padding: 2px 0; border-radius: 6px;
}
.hist-toggle:hover { text-decoration: underline; }
.hist-toggle:focus-visible { outline: none; box-shadow: var(--ring); }

/* ---------------- 弹窗 ---------------- */
[hidden] { display: none !important; }
.modal-mask { display: grid; place-items: center; z-index: 70; padding: 18px; }
.modal {
  background: var(--bg2); border: 1px solid var(--line-strong);
  border-radius: 16px; width: min(460px, 100%); padding: 22px 24px;
  box-shadow: var(--shadow-pop);
  animation: modalIn .22s var(--ease);
}
.modal h2 { margin: 0 0 10px; font-size: 17px; font-weight: 600; }
.modal p { margin: 4px 0 14px; color: var(--muted); font-size: 14px; white-space: pre-wrap; word-break: break-all; line-height: 1.65; }
.modal .spinner {
  display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 7px;
  border: 2px solid rgba(76, 141, 255, .25); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes drawerIn { from { transform: translateX(32px); opacity: 0; } }
@keyframes modalIn { from { transform: translateY(12px) scale(.97); opacity: 0; } }

/* ---------------- 表单 ---------------- */
.login-tip { color: var(--faint) !important; font-size: 13px !important; }
.field { margin: 12px 0; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.field input, .field select {
  width: 100%; border: 1px solid var(--line-strong); background: var(--bg1);
  border-radius: var(--r-m); padding: 8px 12px; font-size: 14px; outline: none; color: var(--text);
}
.field select { appearance: auto; }
.field select option { background: var(--bg2); color: var(--text); }
.field input::placeholder { color: var(--faint); }
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: var(--ring); }
.field input:disabled { opacity: .6; }
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #1c1f25 inset;
  caret-color: var(--text);
  transition: background-color 99999s ease-in-out 0s;
}
.form-err { color: var(--danger); font-size: 13px; margin: 6px 0 2px; white-space: normal; }
.form-ok { color: var(--ok); font-size: 13px; margin: 6px 0 2px; }
.form-err:empty, .form-ok:empty { display: none; }
.check-row {
  display: flex; align-items: center; gap: 8px; margin: 10px 0 4px;
  font-size: 13px; color: var(--muted); cursor: pointer; user-select: none;
}
.check-row input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer;
}

/* ---------------- 账号管理 ---------------- */
.admin-tip {
  background: rgba(76, 141, 255, .08); border: 1px solid rgba(76, 141, 255, .22);
  color: #a9c8ff; border-radius: var(--r-m); padding: 8px 12px; font-size: 12px; margin-bottom: 12px; line-height: 1.6;
}
.urow { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.urow:last-child { border-bottom: 0; }
.urow .u-main { flex: 1 1 auto; min-width: 0; }
.urow .u-name { font-weight: 600; font-size: 14px; }
.urow .u-sub { font-size: 12px; color: var(--faint); margin-top: 1px; }
.urow .u-actions { flex: 0 0 auto; display: flex; gap: 6px; }
.urow .u-actions .act { font-size: 12px; padding: 3px 10px; color: var(--muted); }
.urow .u-actions .act:hover { color: var(--accent); }

/* 徽标（tonal 风格） */
.badge {
  display: inline-block; font-size: 11px; border-radius: 999px; padding: 1px 9px; margin-left: 6px;
  vertical-align: 1px; font-weight: 500; border: 1px solid transparent; line-height: 1.6;
}
.badge.admin { background: rgba(124, 108, 255, .15); color: #b3a8ff; border-color: rgba(124, 108, 255, .3); }
.badge.member { background: rgba(255, 255, 255, .07); color: var(--muted); border-color: var(--line); }
.badge.muted { background: rgba(255, 255, 255, .07); color: var(--muted); border-color: var(--line); }
.badge.warn { background: var(--warn-weak); color: #ffcb6e; border-color: rgba(245, 181, 68, .3); }
.badge.off { background: var(--danger-weak); color: var(--danger); border-color: rgba(255, 90, 84, .3); }
.badge.on { background: var(--ok-weak); color: #5fd8a2; border-color: rgba(55, 201, 136, .3); }

/* ---------------- 同步设置 ---------------- */
.sync-sec { margin: 18px 0 6px; }
.sync-sec-t { font-size: 13px; font-weight: 600; margin-bottom: 10px; color: var(--text); display: flex; align-items: center; }
.sync-sec-t::before { content: ''; width: 3px; height: 13px; border-radius: 2px; background: var(--accent); margin-right: 8px; }
.mode-row { display: flex; gap: 8px; }
.mode-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 1px solid var(--line-strong); background: var(--bg1);
  border-radius: 10px; padding: 11px 6px; cursor: pointer; color: var(--text); font: inherit; line-height: 1.35;
}
.mode-btn:hover { border-color: rgba(76, 141, 255, .55); background: rgba(255, 255, 255, .02); }
.mode-btn .mode-main { font-size: 14px; font-weight: 600; }
.mode-btn .mode-sub { font-size: 11px; color: var(--faint); }
.mode-btn.active {
  background: linear-gradient(180deg, rgba(76, 141, 255, .16), rgba(76, 141, 255, .07));
  border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent), 0 2px 10px rgba(76, 141, 255, .18);
}
.mode-btn.active .mode-main { color: #8fb9ff; }
.mode-btn.active .mode-sub { color: var(--muted); }
.hour-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.hb {
  border: 1px solid var(--line); background: var(--bg1); color: var(--muted);
  border-radius: 7px; padding: 6px 0; font-size: 12px; cursor: pointer; text-align: center;
  font-variant-numeric: tabular-nums;
}
.hb:hover { border-color: rgba(76, 141, 255, .55); color: var(--text); }
.hb.on {
  background: linear-gradient(180deg, #5597ff, var(--accent-lo));
  border-color: rgba(122, 160, 255, .4); color: #fff; font-weight: 600;
  box-shadow: 0 2px 8px rgba(53, 119, 232, .3);
}
.hour-tools { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.hint { font-size: 12px; color: var(--faint); margin-left: auto; }
.sync-info {
  margin-top: 16px; background: var(--bg1); border: 1px solid var(--line);
  border-radius: var(--r-m); padding: 10px 14px; font-size: 13px; color: var(--muted);
  display: flex; flex-direction: column; gap: 5px;
}
.si-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.si-row b { color: #8fb9ff; font-weight: 600; }
.sync-actions { display: flex; gap: 10px; margin: 16px 0 4px; }
.sync-actions .btn-main { flex: 1; }
.runrow { border-bottom: 1px dashed rgba(255, 255, 255, .07); padding: 8px 0; font-size: 12px; display: flex; flex-direction: column; gap: 3px; }
.runrow:last-child { border-bottom: 0; }
.runrow .r-t { font-weight: 500; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.runrow .r-t .badge { margin-left: 0; }
.runrow .r-s { color: var(--faint); word-break: break-all; }
#syncBody.loading { opacity: .55; pointer-events: none; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 720px) {
  .fmeta .fupd { display: none; }
  .toolbar { flex-direction: column; align-items: stretch; }
  #searchBox { flex: 1 1 auto; }
  .top-inner { padding: 10px 14px; }
  main { padding: 0 14px; }
  .frow { height: auto; min-height: 54px; padding: 10px 12px; }
  .fmeta { gap: 12px; }
  .fsize { min-width: 0; }
  .hour-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =========================================================================
   浅色主题（Light）— html[data-theme="light"] 时覆盖
   结构/布局与深色完全一致，仅替换颜色令牌与少量暗色专用取值。
   ========================================================================= */
[data-theme="light"] {
  color-scheme: light;
  --bg0: #f3f4f8;
  --bg1: #ffffff;
  --bg2: #ffffff;
  --bg3: #eef1f6;
  --line: rgba(16, 24, 40, .09);
  --line-strong: rgba(16, 24, 40, .16);
  --text: #1f2430;
  --muted: #5e6a7c;
  --faint: #9099ab;
  --accent: #2f6bdd;
  --accent-hi: #4c8dff;
  --accent-lo: #1d56c2;
  --accent-weak: rgba(47, 107, 221, .10);
  --accent-glow: rgba(47, 107, 221, .25);
  --ok: #0f9a5f;
  --ok-weak: rgba(15, 154, 95, .12);
  --danger: #d54941;
  --danger-weak: rgba(213, 73, 65, .12);
  --warn: #b8750b;
  --warn-weak: rgba(184, 117, 11, .13);
  --ring: 0 0 0 3px rgba(47, 107, 221, .18);
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .05);
  --shadow-pop: 0 18px 48px rgba(16, 24, 40, .16), 0 4px 12px rgba(16, 24, 40, .08);
}
[data-theme="light"] body {
  background: radial-gradient(1100px 460px at 50% -12%, rgba(47, 107, 221, .09), transparent 62%), var(--bg0);
}
[data-theme="light"] ::selection { background: rgba(47, 107, 221, .20); }
[data-theme="light"] * { scrollbar-color: #c2c8d4 transparent; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #c2c8d4; }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background-color: #aeb6c4; }

[data-theme="light"] .topbar { background: rgba(255, 255, 255, .82); }
[data-theme="light"] .logo { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 4px 14px rgba(47, 107, 221, .20); }
[data-theme="light"] .chip { background: rgba(16, 24, 40, .045); }
[data-theme="light"] .chip.updated { color: #0f9a5f; }
[data-theme="light"] .chip.user-chip { background: rgba(47, 107, 221, .10); border-color: rgba(47, 107, 221, .30); color: #1d5fd6; }

[data-theme="light"] .btn-ghost:hover { background: rgba(16, 24, 40, .05); border-color: rgba(16, 24, 40, .26); }
[data-theme="light"] .btn-ghost:not(:disabled):active { background: rgba(16, 24, 40, .08); }
[data-theme="light"] .btn-main { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 8px rgba(47, 107, 221, .22); }

[data-theme="light"] .summary {
  background: linear-gradient(180deg, rgba(47, 107, 221, .08), rgba(47, 107, 221, .03));
  color: #27498f;
}
[data-theme="light"] .summary b { color: #1d5fd6; }
[data-theme="light"] .summary .add { color: #0f9a5f; }
[data-theme="light"] .crumbs .sep { color: #b7becb; }

[data-theme="light"] .frow { border-bottom-color: rgba(16, 24, 40, .07); }
[data-theme="light"] .frow:hover { background: rgba(16, 24, 40, .035); }
[data-theme="light"] .frow.folder:hover { background: rgba(47, 107, 221, .07); }
[data-theme="light"] .ico { background: rgba(16, 24, 40, .05); }
[data-theme="light"] .frow.folder .fname .t { color: #1d4fd7; }
[data-theme="light"] .fbtn .act.dl-now { color: #1d5fd6; }
[data-theme="light"] .fbtn .act.dl-now:hover { background: rgba(47, 107, 221, .16); color: #1243a8; }

[data-theme="light"] .tag-upd { color: #a86a05; }
[data-theme="light"] .tag-new { color: #0f9a5f; }
[data-theme="light"] .foot { color: #9aa3b4; }

[data-theme="light"] .drawer-mask, [data-theme="light"] .modal-mask { background: rgba(31, 38, 56, .32); }
[data-theme="light"] .drawer-head { background: rgba(16, 24, 40, .02); }
[data-theme="light"] .hitem li.add { color: #0f9a5f; }
[data-theme="light"] .hitem li.chg { color: #a86a05; }

[data-theme="light"] input:-webkit-autofill, [data-theme="light"] input:-webkit-autofill:hover, [data-theme="light"] input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
}

[data-theme="light"] .admin-tip { background: rgba(47, 107, 221, .07); border-color: rgba(47, 107, 221, .20); color: #2457b0; }
[data-theme="light"] .urow { border-bottom-color: rgba(16, 24, 40, .07); }

[data-theme="light"] .badge.admin { background: rgba(124, 108, 255, .12); color: #5b48d6; border-color: rgba(124, 108, 255, .30); }
[data-theme="light"] .badge.member, [data-theme="light"] .badge.muted { background: rgba(16, 24, 40, .05); }
[data-theme="light"] .badge.warn { color: #a86a05; }
[data-theme="light"] .badge.on { color: #0f9a5f; }

[data-theme="light"] .mode-btn.active .mode-main { color: #1d5fd6; }
[data-theme="light"] .si-row b { color: #1d5fd6; }
[data-theme="light"] .runrow { border-bottom-color: rgba(16, 24, 40, .10); }
