/* PODerp 主题：深色 + 橙色强调 */
:root, html.dark {
  --c-accent: #e8794a;
  --c-accent-2: #f39b6d;
  --c-bg: #141416;
  --c-bg-2: #1c1c1f;
  --c-bg-3: #26262a;
  --c-border: #333338;
  --c-text: #e8e8ea;
  --c-text-2: #a0a0a8;
  --el-color-primary: #e8794a;
  --el-color-primary-light-3: #ef9a73;
  --el-color-primary-light-5: #f3b394;
  --el-color-primary-light-7: #6b3e2a;
  --el-color-primary-light-8: #4a2c1f;
  --el-color-primary-light-9: #2e1d15;
  --el-color-primary-dark-2: #c9612f;
  --el-bg-color: #1c1c1f;
  --el-bg-color-overlay: #222226;
  --el-fill-color-blank: #1c1c1f;
  --el-border-color: #38383e;
  --el-border-color-light: #333338;
  --el-border-color-lighter: #2c2c31;
}
* { box-sizing: border-box; }
html, body, #app { margin: 0; height: 100%; background: var(--c-bg); color: var(--c-text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; }
a { color: var(--c-accent); text-decoration: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #3a3a40; border-radius: 4px; }

/* 顶部导航 */
.topbar { height: 56px; display: flex; align-items: center; padding: 0 20px; background: #0f0f11; border-bottom: 1px solid var(--c-border); position: sticky; top: 0; z-index: 50; }
.logo { font-weight: 800; font-size: 20px; letter-spacing: .5px; margin-right: 36px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.logo b { color: var(--c-accent); }
.logo small { font-size: 11px; font-weight: 500; color: var(--c-text-2); border: 1px solid var(--c-border); border-radius: 4px; padding: 0 5px; }
.topnav { display: flex; gap: 6px; flex: 1; }
.topnav a { color: var(--c-text-2); padding: 7px 16px; border-radius: 8px; font-weight: 500; }
.topnav a:hover { color: var(--c-text); background: var(--c-bg-3); }
.topnav a.active { color: #fff; background: var(--c-accent); }
.topright { display: flex; gap: 14px; align-items: center; }
.beans { background: linear-gradient(90deg, #e8794a, #f0a060); color: #fff; padding: 4px 12px; border-radius: 14px; font-size: 13px; cursor: pointer; }

/* 侧栏 + 内容 */
.main { display: flex; height: calc(100% - 56px); }
.sidebar { width: 196px; flex-shrink: 0; background: var(--c-bg-2); border-right: 1px solid var(--c-border); padding: 12px 10px; overflow-y: auto; }
.sidebar .grp { color: var(--c-text-2); font-size: 12px; margin: 14px 8px 6px; }
.sidebar a { display: flex; align-items: center; gap: 8px; color: var(--c-text); padding: 9px 12px; border-radius: 8px; margin-bottom: 2px; font-size: 13px; }
.sidebar a:hover { background: var(--c-bg-3); }
.sidebar a.active { background: rgba(232,121,74,.15); color: var(--c-accent); }
.content { flex: 1; overflow: auto; padding: 18px 22px; min-width: 0; }
.page-title { font-size: 18px; font-weight: 600; margin: 0 0 14px; display: flex; align-items: center; gap: 12px; }
.page-title .sub { font-size: 12px; color: var(--c-text-2); font-weight: 400; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.panel { background: var(--c-bg-2); border: 1px solid var(--c-border); border-radius: 10px; padding: 16px; }
.muted { color: var(--c-text-2); font-size: 12px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(var(--cell, 160px), 1fr)); }
.thumb { position: relative; background: #0d0d0f url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><rect width="8" height="8" fill="%23222"/><rect x="8" y="8" width="8" height="8" fill="%23222"/></svg>'); border: 1px solid var(--c-border); border-radius: 8px; overflow: hidden; aspect-ratio: 1; }
.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumb.sel { outline: 2px solid var(--c-accent); }
.thumb.disc { opacity: .35; }
.thumb .ck { position: absolute; left: 6px; top: 6px; }
.thumb .badge { position: absolute; right: 6px; top: 6px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 4px; }
.thumb .ops { position: absolute; left: 0; right: 0; bottom: 0; display: none; gap: 4px; justify-content: center; padding: 6px; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.thumb:hover .ops { display: flex; }
.cap { font-size: 12px; color: var(--c-text-2); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-card { background: var(--c-bg-2); border: 1px solid var(--c-border); border-radius: 12px; padding: 16px; cursor: pointer; transition: .15s; }
.tool-card:hover { border-color: var(--c-accent); transform: translateY(-2px); }
.tool-card .t { font-weight: 600; margin: 8px 0 4px; display: flex; align-items: center; gap: 6px; }
.tool-card .d { font-size: 12px; color: var(--c-text-2); line-height: 1.5; height: 36px; overflow: hidden; }
.tool-card .ic { width: 38px; height: 38px; border-radius: 10px; background: rgba(232,121,74,.15); color: var(--c-accent); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.hero { border-radius: 14px; padding: 28px 30px; background: radial-gradient(circle at 80% 0%, rgba(232,121,74,.35), transparent 55%), #1b1b1f; border: 1px solid var(--c-border); margin-bottom: 18px; }
.hero h1 { margin: 0 0 6px; font-size: 26px; }
.flow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.flow span { background: var(--c-bg-3); border: 1px solid var(--c-border); padding: 5px 12px; border-radius: 16px; font-size: 13px; }
.flow i { color: var(--c-accent); font-style: normal; }
.stat { background: var(--c-bg-2); border: 1px solid var(--c-border); border-radius: 10px; padding: 14px 16px; }
.stat .n { font-size: 24px; font-weight: 700; margin-top: 4px; }
.row-item { display: flex; gap: 14px; padding: 12px; border-bottom: 1px solid var(--c-border); align-items: flex-start; }
.login-wrap { height: 100%; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 70% 20%, rgba(232,121,74,.25), transparent 50%), var(--c-bg); }
.login-box { width: 380px; background: var(--c-bg-2); border: 1px solid var(--c-border); border-radius: 14px; padding: 30px; }
.el-table { --el-table-bg-color: var(--c-bg-2); --el-table-tr-bg-color: var(--c-bg-2); --el-table-header-bg-color: var(--c-bg-3); --el-table-row-hover-bg-color: #2a2a2f; }
.el-dialog { --el-dialog-bg-color: #1e1e22; }
.el-drawer { --el-drawer-bg-color: #1e1e22; }
.fab { position: fixed; right: 20px; bottom: 24px; z-index: 60; }
.canvas-wrap { position: relative; background: #0b0b0d; border: 1px solid var(--c-border); border-radius: 8px; overflow: hidden; user-select: none; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; font-size: 13px; }
.kv > div:nth-child(odd) { color: var(--c-text-2); }
.result-row { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--c-border); }
.preview-mask { position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 3000; display: flex; align-items: center; justify-content: center; }
.preview-mask img { max-width: 86vw; max-height: 86vh; }
@media (max-width: 900px) { .sidebar { display: none; } .topnav a { padding: 6px 8px; } .logo { margin-right: 12px; } }
