/* =========================================================
   DSH 工作台 · 设计系统
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #06080e;
  --bg-2: #090d15;
  --panel: rgba(255, 255, 255, .034);
  --panel-2: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .075);
  --line-2: rgba(255, 255, 255, .13);
  --text: #e9edf7;
  --text-2: #9aa7bd;
  --text-3: #64708a;
  --accent: #7f9dff;
  --violet: #a78bfa;
  --cyan: #3ddad7;
  --green: #4ade80;
  --amber: #fbbf24;
  --rose: #fb7185;
  --shadow: 0 24px 48px -32px rgba(0, 0, 0, .9);
  --r-lg: 18px;
  --r-md: 13px;
  --r-sm: 10px;
  --speed: .22s;
}

html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) {
  --bg: #eef1f7;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-2: #ffffff;
  --line: rgba(15, 23, 42, .09);
  --line-2: rgba(15, 23, 42, .16);
  --text: #0e1729;
  --text-2: #53627c;
  --text-3: #8b98ad;
  --accent: #4666f5;
  --violet: #7c5cf0;
  --cyan: #0e9c99;
  --green: #16a34a;
  --amber: #d97706;
  --rose: #e11d48;
  --shadow: 0 18px 40px -30px rgba(15, 23, 42, .5);
}

/* ---- 粉色浪漫（低饱和粉） ---- */
html[data-theme="pink"] {
  --bg: #faf3f6;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-2: #fdf7fa;
  --line: rgba(120, 60, 80, .10);
  --line-2: rgba(120, 60, 80, .18);
  --text: #2e1f27;
  --text-2: #7d5f6c;
  --text-3: #a58b95;
  --accent: #b9748d;
  --violet: #9d6b8f;
  --cyan: #0e9c99;
  --green: #16a34a;
  --amber: #d97706;
  --rose: #c2506a;
  --shadow: 0 18px 40px -30px rgba(120, 60, 80, .45);
}
html[data-theme="red"] {
  --bg: #fbf2f3;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-2: #fef4f5;
  --line: rgba(140, 30, 45, .10);
  --line-2: rgba(140, 30, 45, .18);
  --text: #2d1c1f;
  --text-2: #7f5a60;
  --text-3: #a98d90;
  --accent: #ee1633;
  --violet: #a8526b;
  --cyan: #0e9c99;
  --green: #16a34a;
  --amber: #d97706;
  --rose: #ee1633;
  --shadow: 0 18px 40px -30px rgba(140, 30, 45, .4);
}

html, body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, "Segoe UI Variable", "Segoe UI", "Microsoft YaHei UI",
               "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 13.5px;
  line-height: 1.55;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(127, 157, 255, .3); }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ic {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .22); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, .4); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* =========================================================
   布局
   ========================================================= */
.app {
  display: grid;
  grid-template-columns: 262px minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  min-height: 0;
}
.app > * { min-width: 0; min-height: 0; }

.sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 14px 16px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(127, 157, 255, .08), transparent 60%),
    var(--bg-2);
  z-index: 20;
}

.main {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 8% -12%, rgba(127, 157, 255, .11), transparent 62%),
    radial-gradient(760px 460px at 102% -4%, rgba(167, 139, 250, .10), transparent 60%),
    radial-gradient(900px 600px at 70% 120%, rgba(61, 218, 215, .05), transparent 60%),
    var(--bg);
}

html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .main {
  background:
    radial-gradient(900px 520px at 8% -12%, rgba(70, 102, 245, .10), transparent 62%),
    radial-gradient(760px 460px at 102% -4%, rgba(124, 92, 240, .10), transparent 60%),
    var(--bg);
}

/* =========================================================
   侧边栏
   ========================================================= */
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 0; }

.logo {
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #8aa4ff 0%, #7c6cf6 48%, #4ad8d3 100%);
  box-shadow: 0 10px 24px -10px rgba(124, 108, 246, .85), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.logo .ic { width: 19px; height: 19px; }

.brand-txt { display: flex; flex-direction: column; line-height: 1.3; }
.brand-txt strong { font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; }
.brand-txt span { font-size: 10.5px; color: var(--text-3); letter-spacing: .04em; }

.workspace {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  text-align: left;
  transition: background var(--speed), border-color var(--speed);
}
.workspace:hover { background: var(--panel-2); border-color: var(--line-2); }

.ws-avatar {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 650;
  color: #0b1020;
  background: linear-gradient(135deg, #b9c8ff, #8ce7e3);
}
.ws-meta { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.35; }
.ws-meta b { font-size: 12.5px; font-weight: 600; }
.ws-meta small { font-size: 10.5px; color: var(--text-3); }
.chev { width: 14px; height: 14px; color: var(--text-3); transform: rotate(90deg); }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }

.nav-label {
  padding: 14px 12px 6px;
  font-size: 10px; font-weight: 600;
  letter-spacing: .12em;
  color: var(--text-3);
  text-transform: uppercase;
}

.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  height: 39px; padding: 0 12px;
  border-radius: 11px;
  color: var(--text-2);
  font-size: 13px; font-weight: 500;
  transition: background var(--speed), color var(--speed);
}
.nav-item .ic { width: 17.5px; height: 17.5px; opacity: .85; }
.nav-item:hover { background: var(--panel); color: var(--text); }
.nav-item.active {
  color: var(--text);
  background: linear-gradient(90deg, rgba(127, 157, 255, .17), rgba(127, 157, 255, .025));
  box-shadow: inset 0 0 0 1px rgba(127, 157, 255, .22);
}
.nav-item.active .ic { color: var(--accent); opacity: 1; }
.nav-item.active::before {
  content: ""; position: absolute; left: -14px; top: 50%;
  width: 3px; height: 18px; transform: translateY(-50%);
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent), var(--cyan));
  box-shadow: 0 0 12px rgba(127, 157, 255, .9);
}
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .nav-item.active { color: #1c2a56; }

.badge {
  margin-left: auto;
  min-width: 20px; height: 18px;
  padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: 6px;
  font-size: 10.5px; font-style: normal; font-weight: 600;
  color: var(--text-2);
  background: rgba(255, 255, 255, .07);
}
.nav-item.active .badge { background: rgba(127, 157, 255, .2); color: #cdd8ff; }
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .nav-item.active .badge { background: rgba(70, 102, 245, .13); color: #2c3f8f; }

.side-foot { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }

.quota { padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); }
.quota-head { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-2); }
.quota-head b { color: var(--text); font-weight: 600; }
.quota-bar { height: 4px; margin: 8px 0 7px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.quota-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--cyan)); }
.quota-foot { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-3); }

.user-card {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: background var(--speed), border-color var(--speed);
}
.user-card:hover { background: var(--panel); border-color: var(--line); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 650;
  color: #10162a;
  background: linear-gradient(135deg, #ffd6a5, #f9a8d4 55%, #c4b5fd);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .06);
}
.user-meta { display: flex; flex-direction: column; line-height: 1.3; flex: 1; text-align: left; }
.user-meta b { font-size: 12.5px; font-weight: 600; }
.user-meta small { font-size: 10.5px; color: var(--text-3); }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(74, 222, 128, .14); }

/* =========================================================
   顶栏
   ========================================================= */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 62px; padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .022), transparent);
  flex: none;
  z-index: 15;
}

.crumbs { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); min-width: 0; }
.crumbs .chev { width: 13px; height: 13px; }
.crumbs h1 { font-size: 15.5px; font-weight: 600; color: var(--text); letter-spacing: -.01em; }

.top-actions { display: flex; align-items: center; gap: 9px; }

.search-trigger {
  display: flex; align-items: center; gap: 9px;
  width: 262px; height: 37px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--panel);
  color: var(--text-3); font-size: 12.5px;
  transition: border-color var(--speed), background var(--speed), color var(--speed);
}
.search-trigger:hover { border-color: var(--line-2); background: var(--panel-2); color: var(--text-2); }
.search-trigger .ic { width: 16px; height: 16px; }
.search-trigger span { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

kbd {
  font-family: "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  font-size: 10px; line-height: 1;
  padding: 4px 5px; border-radius: 5px;
  color: var(--text-3);
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .04);
  white-space: nowrap;
}
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) kbd { background: rgba(15, 23, 42, .04); }

.icon-btn {
  position: relative;
  width: 37px; height: 37px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--panel); color: var(--text-2);
  transition: background var(--speed), color var(--speed), border-color var(--speed);
}
.icon-btn:hover { background: var(--panel-2); color: var(--text); border-color: var(--line-2); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn.sm .ic { width: 15px; height: 15px; }

.notif-dot {
  position: absolute; top: 8px; right: 9px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 2px var(--bg-2), 0 0 8px rgba(251, 113, 133, .8);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 37px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--panel); color: var(--text);
  font-size: 12.5px; font-weight: 550;
  white-space: nowrap;
  transition: transform var(--speed), background var(--speed), border-color var(--speed), box-shadow var(--speed);
}
.btn .ic { width: 15px; height: 15px; }
.btn:hover { background: var(--panel-2); border-color: var(--line-2); }
.btn:active { transform: translateY(1px); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 11px; border-radius: 8px; }

.btn-primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #6f8dff, #8b5cf6);
  box-shadow: 0 10px 22px -12px rgba(111, 141, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.btn-primary:hover { background: linear-gradient(135deg, #7d99ff, #9668f8); border-color: transparent; box-shadow: 0 14px 26px -12px rgba(111, 141, 255, .95); }

.btn-ghost { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .14); }
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .btn-ghost { background: rgba(255, 255, 255, .55); border-color: var(--line); }

.link-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; color: var(--text-3);
  transition: color var(--speed);
}
.link-btn .ic { width: 13px; height: 13px; }
.link-btn:hover { color: var(--accent); }

/* 通知弹层 */
.notif-wrap { position: relative; }
.notif-menu {
  position: absolute; top: 46px; right: 0; width: 320px;
  padding: 8px;
  border: 1px solid var(--line-2); border-radius: 15px;
  background: var(--bg-2);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .75);
  z-index: 50;
  animation: pop .18s ease both;
}
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .notif-menu { box-shadow: 0 24px 60px -28px rgba(15, 23, 42, .35); }
.notif-head { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 10px 10px; }
.notif-head b { font-size: 13px; }
.notif-head span { font-size: 10.5px; color: var(--text-3); }
.notif-item { display: flex; gap: 10px; padding: 10px; border-radius: 10px; }
.notif-item:hover { background: var(--panel); }
.notif-item div { min-width: 0; }
.notif-item b { display: block; font-size: 12px; font-weight: 600; }
.notif-item p { font-size: 11px; color: var(--text-2); margin-top: 1px; }
.notif-item small { font-size: 10px; color: var(--text-3); }
.notif-ico {
  width: 26px; height: 26px; flex: none; display: grid; place-items: center;
  border-radius: 8px; margin-top: 1px;
}
.notif-ico .ic { width: 14px; height: 14px; }
.notif-ico.ok { color: var(--green); background: rgba(74, 222, 128, .12); }
.notif-ico.warn { color: var(--amber); background: rgba(251, 191, 36, .12); }
.notif-ico.info { color: var(--accent); background: rgba(127, 157, 255, .12); }
.notif-all { width: 100%; margin-top: 4px; padding: 9px; border-radius: 9px; font-size: 11.5px; color: var(--text-2); background: var(--panel); }
.notif-all:hover { color: var(--text); background: var(--panel-2); }

/* =========================================================
   视图容器
   ========================================================= */
.views { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 14px 24px 8px; }
.views::-webkit-scrollbar { width: 10px; }

.view { display: none; max-width: 1440px; margin: 0 auto; }
.view.active { display: block; animation: rise .42s cubic-bezier(.2, .7, .2, 1) both; }

.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.view-head h2 { font-size: 21px; font-weight: 620; letter-spacing: -.02em; }
.view-head p { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.view-tools { display: flex; align-items: center; gap: 9px; }

/* =========================================================
   通用卡片
   ========================================================= */
.card {
  position: relative;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .016));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), var(--shadow);
  transition: border-color var(--speed), background var(--speed);
}
.card:hover { border-color: var(--line-2); }
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .card {
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 16px 32px -28px rgba(16, 24, 40, .4);
}

.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-head h3 { font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; }
.card-head p { font-size: 11px; color: var(--text-3); margin-top: 1px; }

.seg {
  display: inline-flex; gap: 2px; padding: 3px;
  border: 1px solid var(--line); border-radius: 9px;
  background: rgba(255, 255, 255, .03);
}
.seg button {
  height: 24px; padding: 0 9px; border-radius: 6px;
  font-size: 11px; color: var(--text-3);
  transition: background var(--speed), color var(--speed);
}
.seg button:hover { color: var(--text-2); }
.seg button.active { color: var(--text); background: rgba(255, 255, 255, .09); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .seg button.active { background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .14); }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 20px; padding: 0 8px; border-radius: 99px;
  font-size: 10.5px; font-weight: 550;
  color: var(--text-2); background: rgba(255, 255, 255, .06);
  white-space: nowrap;
}
.pill.ok { color: var(--green); background: rgba(74, 222, 128, .12); }
.pill.info { color: var(--accent); background: rgba(127, 157, 255, .13); }
.pill.warn { color: var(--amber); background: rgba(251, 191, 36, .12); }

/* =========================================================
   概览 · Hero
   ========================================================= */
.hero {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  padding: 16px 24px;
  border: 1px solid rgba(127, 157, 255, .24);
  border-radius: 20px;
  background:
    linear-gradient(115deg, rgba(127, 157, 255, .17), rgba(167, 139, 250, .10) 44%, rgba(61, 218, 215, .075)),
    rgba(255, 255, 255, .012);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 30px 60px -50px #000;
}
.hero::before {
  content: ""; position: absolute; right: -60px; top: -120px;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, .3), transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: .25;
  -webkit-mask-image: radial-gradient(110% 130% at 100% 0%, #000, transparent 62%);
  mask-image: radial-gradient(110% 130% at 100% 0%, #000, transparent 62%);
  pointer-events: none;
}
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .hero {
  background: linear-gradient(115deg, rgba(70, 102, 245, .12), rgba(124, 92, 240, .08) 44%, rgba(14, 156, 153, .06)), #fff;
  border-color: rgba(70, 102, 245, .2);
}
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .hero::after { opacity: .5; background-image:
  linear-gradient(rgba(15, 23, 42, .06) 1px, transparent 1px),
  linear-gradient(90deg, rgba(15, 23, 42, .06) 1px, transparent 1px); }

.hero-copy { position: relative; min-width: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  height: 22px; padding: 0 10px; margin-bottom: 6px;
  border-radius: 99px;
  font-size: 10.5px; color: #c6d2f7;
  background: rgba(127, 157, 255, .13);
  border: 1px solid rgba(127, 157, 255, .2);
}
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .eyebrow { color: #3b4f9e; background: rgba(70, 102, 245, .08); border-color: rgba(70, 102, 245, .16); }
.eyebrow .sep { opacity: .45; }

.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, .16);
  animation: breathe 2.4s ease-in-out infinite;
}

.hero h2 { font-size: 22.5px; font-weight: 640; letter-spacing: -.025em; line-height: 1.2; }
.hero p { margin-top: 3px; font-size: 12.5px; color: var(--text-2); }
.hero p b { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; gap: 9px; margin-top: 11px; }
.hero-actions .btn { height: 32px; font-size: 12px; }
.hero-actions .btn-primary .ic { transition: transform var(--speed); }
.hero-actions .btn-primary:hover .ic { transform: translateX(2px); }

.hero-progress { position: relative; display: flex; align-items: center; gap: 18px; flex: none; }
.ring-wrap { position: relative; width: 96px; height: 96px; }
.ring { width: 96px; height: 96px; }
.ring-fg { filter: drop-shadow(0 0 6px rgba(127, 157, 255, .55)); }
.ring-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1;
}
.ring-center b { font-size: 21px; font-weight: 650; letter-spacing: -.03em; }
.ring-center b span { font-size: 11px; color: var(--text-3); font-weight: 500; }
.ring-center small { margin-top: 5px; font-size: 9.5px; color: var(--text-3); letter-spacing: .04em; }

.ring-meta { display: flex; flex-direction: column; gap: 3px; }
.ring-meta p { font-size: 12px; color: var(--text-2); }
.ring-meta p b { color: var(--text); font-weight: 650; }
.trend { font-size: 10.5px; }
.trend.up { color: var(--green); }
.trend.subtle { color: var(--text-3); }

/* =========================================================
   概览 · KPI
   ========================================================= */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 11px; }

.kpi { padding: 12px 15px 11px; overflow: hidden; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-ico {
  width: 28px; height: 28px; border-radius: 9px;
  display: grid; place-items: center;
}
.kpi-ico .ic { width: 15px; height: 15px; }
.tone-blue { color: var(--accent); background: rgba(127, 157, 255, .13); }
.tone-violet { color: var(--violet); background: rgba(167, 139, 250, .13); }
.tone-cyan { color: var(--cyan); background: rgba(61, 218, 215, .12); }
.tone-amber { color: var(--amber); background: rgba(251, 191, 36, .12); }
.tone-green { color: var(--green); background: rgba(74, 222, 128, .12); }

.delta {
  font-size: 10.5px; font-weight: 550;
  padding: 2px 6px; border-radius: 6px;
}
.delta.up { color: var(--green); background: rgba(74, 222, 128, .1); }
.delta.down { color: var(--cyan); background: rgba(61, 218, 215, .1); }

.kpi-val { margin-top: 8px; font-size: 23px; font-weight: 640; letter-spacing: -.035em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-val small { font-size: 12px; margin-left: 2px; color: var(--text-3); font-weight: 500; letter-spacing: 0; }
.kpi-label { margin-top: 1px; font-size: 11px; color: var(--text-3); }

.spark { position: absolute; right: 10px; bottom: 10px; width: 74px; height: 30px; opacity: .95; overflow: visible; }

/* =========================================================
   概览 · 图表
   ========================================================= */
.grid-b, .grid-c { display: grid; gap: 12px; margin-top: 11px; }
.grid-b { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid-c { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }

.chart-card { display: flex; flex-direction: column; }
.chart-wrap { position: relative; flex: 1; min-height: 158px; margin-top: 8px; }
.chart-wrap svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart-legend { display: flex; align-items: center; gap: 16px; padding-top: 2px; font-size: 10.5px; color: var(--text-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 7px; height: 7px; border-radius: 2px; }
.chart-legend .note { margin-left: auto; color: var(--text-3); }
.chart-legend .note b { color: var(--green); font-weight: 600; }

.chart-tip {
  position: absolute; z-index: 5;
  min-width: 132px; padding: 8px 10px;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: rgba(10, 14, 22, .94);
  box-shadow: 0 16px 36px -14px rgba(0, 0, 0, .9);
  font-size: 10.5px; color: var(--text-2);
  pointer-events: none;
  transform: translate(-50%, -100%);
  backdrop-filter: blur(8px);
}
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .chart-tip { background: rgba(255, 255, 255, .97); }
.chart-tip b { display: block; margin-bottom: 4px; font-size: 10.5px; color: var(--text); font-weight: 600; }
.chart-tip span { display: flex; justify-content: space-between; gap: 14px; font-variant-numeric: tabular-nums; }
.chart-tip em { font-style: normal; display: inline-flex; align-items: center; }
.chart-tip i { display: inline-block; width: 6px; height: 6px; border-radius: 2px; margin-right: 5px; }
.chart-tip .v { display: inline; margin: 0; color: var(--text); font-weight: 600; }

/* 环形图 */
.donut-card { display: flex; flex-direction: column; }
.donut-flex { position: relative; flex: 1; display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.donut { width: 142px; height: 142px; flex: none; }
.donut-center {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 142px; display: flex; flex-direction: column; align-items: center;
  pointer-events: none; line-height: 1.15;
}
.donut-center b { font-size: 23px; font-weight: 650; letter-spacing: -.03em; }
.donut-center span { font-size: 9.5px; color: var(--text-3); }
.donut-legend { display: flex; flex-direction: column; gap: 7px; flex: 1; padding-left: 4px; }
.donut-legend li { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--text-2); }
.donut-legend i { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.donut-legend b { margin-left: auto; font-size: 11.5px; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* =========================================================
   概览 · 智能体
   ========================================================= */
.agents-card { display: flex; flex-direction: column; }
.agent-list { display: flex; flex-direction: column; flex: 1; margin-top: 5px; }
.agent-row { display: flex; align-items: center; gap: 10px; padding: 3px 0; border-bottom: 1px solid rgba(255, 255, 255, .045); }
.agent-row:last-child { border-bottom: 0; }

.agent-ava {
  width: 31px; height: 31px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 650;
  color: #0b1020;
  position: relative;
}
.agent-ava::after {
  content: ""; position: absolute; right: -1px; bottom: -1px;
  width: 8px; height: 8px; border-radius: 50%;
  border: 2px solid var(--bg-2);
  background: var(--text-3);
}
.agent-ava.running::after { background: var(--green); box-shadow: 0 0 8px rgba(74, 222, 128, .8); }
.agent-ava.idle::after { background: var(--amber); }
.agent-ava.offline::after { background: #4b5563; }

.agent-info { min-width: 0; flex: 1; }
.agent-info b { display: block; font-size: 12px; font-weight: 600; }
.agent-info small { display: block; font-size: 10.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.agent-load { width: 64px; flex: none; }
.agent-load .bar { height: 3px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.agent-load .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--cyan)); }
.agent-load small { display: block; margin-top: 3px; font-size: 9.5px; color: var(--text-3); text-align: right; font-variant-numeric: tabular-nums; }

/* 终端 */
.term-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; background: #05080e; border-color: rgba(255, 255, 255, .08); }
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .term-card { background: #0b1019; border-color: rgba(15, 23, 42, .2); }
.term-head {
  display: flex; align-items: center; gap: 12px;
  height: 38px; padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  background: rgba(255, 255, 255, .02);
}
.term-dots { display: flex; gap: 6px; }
.term-dots i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.term-dots i:nth-child(2) { background: #febc2e; }
.term-dots i:nth-child(3) { background: #28c840; }
.term-title { font-family: "SFMono-Regular", "Cascadia Mono", Consolas, monospace; font-size: 10.5px; color: #7c8aa5; letter-spacing: .02em; }
.term-title em { font-style: normal; color: #3ddad7; opacity: .8; }
.term-pause { margin-left: auto; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; color: #6d7b93; }
.term-pause:hover { background: rgba(255, 255, 255, .07); color: #cbd5e1; }
.term-pause .ic { width: 13px; height: 13px; }

.term-body {
  flex: 1 1 0; min-height: 0; padding: 10px 14px 12px;
  overflow-y: auto;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 7px, #000 calc(100% - 5px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 7px, #000 calc(100% - 5px), transparent 100%);
  font-family: "SFMono-Regular", "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
  font-size: 10.5px; line-height: 1.75;
  color: #8b9ab2;
  scrollbar-width: thin;
}
.term-body::-webkit-scrollbar { width: 6px; }
.term-body .ln { display: flex; gap: 8px; white-space: nowrap; animation: logIn .3s ease both; }
.term-body time { color: #48556b; flex: none; }
.term-body .tag { flex: none; font-weight: 600; }
.tag-agent { color: #a78bfa; }
.tag-task { color: #7f9dff; }
.tag-ok { color: #4ade80; }
.tag-warn { color: #fbbf24; }
.tag-sys { color: #3ddad7; }
.term-body .msg { color: #9fb0c9; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.term-body .msg b { color: #dbe4f3; font-weight: 600; }

/* =========================================================
   任务看板
   ========================================================= */
.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  min-height: calc(100dvh - 168px);
}

.col {
  display: flex; flex-direction: column; gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .018);
  min-height: 300px;
  transition: background var(--speed), border-color var(--speed), box-shadow var(--speed);
}
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .col { background: rgba(255, 255, 255, .5); }
.col.over {
  border-color: rgba(127, 157, 255, .55);
  background: rgba(127, 157, 255, .07);
  box-shadow: inset 0 0 0 1px rgba(127, 157, 255, .25);
}

.col-head { display: flex; align-items: center; gap: 7px; padding: 0 3px 6px; }
.col-dot { width: 6px; height: 6px; border-radius: 50%; }
.col-head b { font-size: 12px; font-weight: 600; }
.col-count { font-size: 10.5px; color: var(--text-3); background: rgba(255, 255, 255, .06); border-radius: 5px; padding: 1px 6px; }
.col-head .icon-btn { margin-left: auto; }
.col[data-status="todo"] .col-dot { background: var(--text-3); }
.col[data-status="doing"] .col-dot { background: var(--accent); box-shadow: 0 0 8px rgba(127, 157, 255, .8); }
.col[data-status="review"] .col-dot { background: var(--amber); }
.col[data-status="done"] .col-dot { background: var(--green); }

.task-card {
  position: relative;
  padding: 11px 11px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .028));
  cursor: grab;
  transition: transform var(--speed), border-color var(--speed), box-shadow var(--speed), opacity var(--speed);
  animation: cardIn .3s ease both;
}
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .task-card { background: #fff; }
.task-card:hover { border-color: var(--line-2); transform: translateY(-1px); box-shadow: 0 12px 24px -18px rgba(0, 0, 0, .8); }
.task-card:active { cursor: grabbing; }
.task-card.dragging { opacity: .35; transform: rotate(1.5deg); }
.task-card.done { opacity: .62; }
.task-card.done .task-title { color: var(--text-2); }

.task-title { font-size: 12px; font-weight: 550; line-height: 1.45; padding-right: 16px; }
.task-meta { display: flex; align-items: center; gap: 6px; margin-top: 9px; }
.chip-agent {
  display: inline-flex; align-items: center; gap: 5px;
  height: 19px; padding: 0 6px; border-radius: 6px;
  font-size: 9.5px; color: var(--text-2);
  background: rgba(255, 255, 255, .055);
}
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .chip-agent { background: rgba(15, 23, 42, .05); }
.chip-agent i { width: 6px; height: 6px; border-radius: 50%; }
.chip-due { margin-left: auto; font-size: 9.5px; color: var(--text-3); white-space: nowrap; }
.prio { display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; }
.prio::before { content: ""; width: 5px; height: 5px; border-radius: 50%; }
.prio.high { color: var(--rose); }
.prio.high::before { background: var(--rose); box-shadow: 0 0 6px rgba(251, 113, 133, .8); }
.prio.mid { color: var(--amber); }
.prio.mid::before { background: var(--amber); }
.prio.low { color: var(--text-3); }
.prio.low::before { background: var(--text-3); }

.progress { margin-top: 9px; }
.progress .bar { height: 3px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.progress .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--cyan)); transition: width .6s cubic-bezier(.2, .7, .2, 1); }
.progress small { display: block; margin-top: 4px; font-size: 9px; color: var(--text-3); text-align: right; }

.task-del {
  position: absolute; top: 6px; right: 6px;
  width: 20px; height: 20px; border-radius: 6px;
  display: grid; place-items: center;
  color: var(--text-3); opacity: 0;
  transition: opacity var(--speed), background var(--speed), color var(--speed);
}
.task-del .ic { width: 12px; height: 12px; }
.task-card:hover .task-del { opacity: 1; }
.task-del:hover { background: rgba(251, 113, 133, .15); color: var(--rose); }

.col-add {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  height: 32px; border: 1px dashed var(--line-2); border-radius: 10px;
  font-size: 11px; color: var(--text-3);
  margin-top: auto;
  transition: color var(--speed), border-color var(--speed), background var(--speed);
}
.col-add:hover { color: var(--text); border-color: rgba(127, 157, 255, .5); background: rgba(127, 157, 255, .05); }
.col-add .ic { width: 13px; height: 13px; }

/* =========================================================
   智能体页
   ========================================================= */
.agent-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }

.agent-card { display: flex; flex-direction: column; gap: 12px; }
.agent-card .top { display: flex; align-items: center; gap: 11px; }
.agent-card .agent-ava { width: 40px; height: 40px; border-radius: 12px; font-size: 13.5px; }
.agent-card .who { flex: 1; min-width: 0; }
.agent-card .who b { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 620; }
.agent-card .who small { display: block; font-size: 10.5px; color: var(--text-3); }
.agent-card .task-line { padding: 9px 10px; border-radius: 10px; background: rgba(255, 255, 255, .035); font-size: 11px; color: var(--text-2); min-height: 38px; }
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .agent-card .task-line { background: rgba(15, 23, 42, .035); }
.agent-card .task-line b { color: var(--text); font-weight: 550; }
.agent-card .stats { display: flex; gap: 16px; font-size: 10.5px; color: var(--text-3); }
.agent-card .stats b { display: block; font-size: 15px; color: var(--text); font-weight: 620; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.agent-card .foot { display: flex; align-items: center; gap: 8px; padding-top: 2px; }
.agent-card .foot .btn { height: 31px; padding: 0 11px; font-size: 11px; margin-left: auto; }
.model-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 21px; padding: 0 7px; border-radius: 6px;
  font-family: "SFMono-Regular", Consolas, monospace; font-size: 9.5px;
  color: var(--text-2); background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
}
.model-chip::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--violet); }

.status-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; }
.status-pill i { width: 5px; height: 5px; border-radius: 50%; }
.status-pill.running { color: var(--green); }
.status-pill.running i { background: var(--green); animation: breathe 2s infinite; }
.status-pill.idle { color: var(--amber); }
.status-pill.idle i { background: var(--amber); }
.status-pill.offline { color: var(--text-3); }
.status-pill.offline i { background: var(--text-3); }

.table-card { padding: 15px 17px 6px; margin-top: 13px; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 11.5px; }
.table th {
  text-align: left; font-size: 10px; font-weight: 550; color: var(--text-3);
  padding: 8px 10px; border-bottom: 1px solid var(--line);
  letter-spacing: .04em; white-space: nowrap;
}
.table td { padding: 10px; border-bottom: 1px solid rgba(255, 255, 255, .045); color: var(--text-2); vertical-align: middle; }
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .table td { border-color: rgba(15, 23, 42, .06); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--speed); }
.table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.table td:first-child { color: var(--text); font-weight: 500; }

/* =========================================================
   日程
   ========================================================= */
.schedule-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 13px; align-items: start; }
.timeline-card { padding-bottom: 10px; }

.timeline { margin-top: 12px; }
.timeline li {
  position: relative;
  display: grid; grid-template-columns: 46px 1fr; gap: 20px;
  padding: 0 0 18px 0;
}
.timeline li::before {
  content: ""; position: absolute; left: 56px; top: 18px; bottom: 0;
  width: 1px; background: var(--line);
}
.timeline li:last-child { padding-bottom: 4px; }
.timeline li:last-child::before { display: none; }
.timeline time { font-family: "SFMono-Regular", Consolas, monospace; font-size: 10.5px; color: var(--text-3); padding-top: 3px; text-align: right; }
.timeline li > div { position: relative; }
.timeline li > div::before {
  content: ""; position: absolute; left: -16px; top: 6px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--bg-2); border: 2px solid var(--line-2);
  box-sizing: content-box; z-index: 1;
}
.timeline li.done > div::before { background: var(--green); border-color: rgba(74, 222, 128, .3); }
.timeline li.now > div::before { background: var(--accent); border-color: rgba(127, 157, 255, .35); box-shadow: 0 0 0 4px rgba(127, 157, 255, .12); }
.timeline b { display: block; font-size: 12.5px; font-weight: 600; }
.timeline p { margin: 2px 0 6px; font-size: 11px; color: var(--text-3); }
.timeline li.now > div { padding: 10px 12px; border-radius: 12px; background: rgba(127, 157, 255, .07); border: 1px solid rgba(127, 157, 255, .2); }

.side-stack { display: flex; flex-direction: column; gap: 13px; }

.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 14px; }
.week-day {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 8px 0 9px; border-radius: 10px;
  color: var(--text-3);
  transition: background var(--speed), color var(--speed);
}
.week-day small { font-size: 9.5px; }
.week-day b { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.week-day .dots { display: flex; gap: 3px; height: 4px; }
.week-day .dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.week-day .dots i.w { background: var(--amber); }
.week-day .dots i.g { background: var(--green); }
.week-day.today { background: linear-gradient(180deg, rgba(127, 157, 255, .18), rgba(127, 157, 255, .05)); color: #c9d5ff; box-shadow: inset 0 0 0 1px rgba(127, 157, 255, .3); }
.week-day.today b { color: #fff; }
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .week-day.today b { color: #1c2a56; }
.week-day:hover { background: var(--panel); }

.mini-list { display: flex; flex-direction: column; margin-top: 6px; }
.mini-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .045); }
.mini-list li:last-child { border-bottom: 0; }
.mini-list .dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.mini-list div { flex: 1; min-width: 0; }
.mini-list b { display: block; font-size: 11.5px; font-weight: 550; }
.mini-list small { font-size: 10px; color: var(--text-3); }

.stat-rows li { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .045); font-size: 11.5px; color: var(--text-2); }
.stat-rows li:last-child { border-bottom: 0; }
.stat-rows b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

.focus-bars { display: flex; align-items: flex-end; gap: 9px; height: 104px; margin-top: 14px; }
.focus-bars .fb { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 7px; }
.focus-bars .fb span {
  width: 100%; max-width: 22px; border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, rgba(127, 157, 255, .95), rgba(127, 157, 255, .22));
  transition: filter var(--speed);
}
.focus-bars .fb:hover span { filter: brightness(1.25); }
.focus-bars .fb.today span { background: linear-gradient(180deg, var(--cyan), rgba(61, 218, 215, .2)); box-shadow: 0 0 14px -2px rgba(61, 218, 215, .55); }
.focus-bars small { font-size: 9px; color: var(--text-3); }

/* =========================================================
   文件
   ========================================================= */
.file-table td:first-child { display: flex; align-items: center; gap: 11px; }
.file-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.file-ico .ic { width: 15px; height: 15px; }
.file-name b { display: block; font-size: 11.5px; font-weight: 550; }
.file-name small { font-size: 10px; color: var(--text-3); }
.file-table th:last-child, .file-table td:last-child { text-align: right; width: 60px; }

.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px 4px; margin-top: 6px; border-top: 1px solid var(--line); font-size: 11px; color: var(--text-3); }

/* =========================================================
   设置
   ========================================================= */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; align-items: start; }
.settings-grid .span-2 { grid-column: 1 / -1; }
.session-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .045); }
.session-grid small { display: block; font-size: 10px; color: var(--text-3); margin-bottom: 3px; }
.session-grid b { font-size: 11.5px; font-weight: 550; word-break: break-all; }
.keys { display: inline-flex; gap: 4px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid rgba(255, 255, 255, .045); }
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .set-row { border-color: rgba(15, 23, 42, .06); }
.set-row:last-child { border-bottom: 0; padding-bottom: 4px; }
.set-row b { display: block; font-size: 12px; font-weight: 550; }
.set-row small { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 1px; }

.theme-choice { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, .03); }
.theme-choice button { height: 26px; padding: 0 11px; border-radius: 6px; font-size: 11px; color: var(--text-3); }
.theme-choice button.active { color: var(--text); background: rgba(255, 255, 255, .09); }
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .theme-choice button.active { background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .14); }

.switch { position: relative; width: 36px; height: 21px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch i {
  position: absolute; inset: 0; border-radius: 99px;
  background: rgba(255, 255, 255, .12);
  transition: background var(--speed);
  pointer-events: none;
}
.switch i::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 15px; height: 15px; border-radius: 50%;
  background: #fff; transition: transform var(--speed);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}
.switch input:checked + i { background: linear-gradient(135deg, #6f8dff, #8b5cf6); }
.switch input:checked + i::after { transform: translateX(15px); }

/* =========================================================
   协作 · WorkBuddy
   ========================================================= */
.bridge-pill {
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 99px;
  font-size: 11px; color: var(--text-2);
  background: var(--panel);
  white-space: nowrap;
}
.bridge-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); flex: none; }
.bridge-pill.online { color: var(--green); border-color: rgba(74, 222, 128, .26); background: rgba(74, 222, 128, .07); }
.bridge-pill.online i { background: var(--green); box-shadow: 0 0 8px rgba(74, 222, 128, .8); }
.bridge-pill.running { color: var(--accent); border-color: rgba(127, 157, 255, .3); background: rgba(127, 157, 255, .08); }
.bridge-pill.running i { background: var(--accent); box-shadow: 0 0 8px rgba(127, 157, 255, .9); animation: breathe 1.6s infinite; }
.bridge-pill.reconnecting { color: var(--amber); border-color: rgba(251, 191, 36, .28); background: rgba(251, 191, 36, .07); }
.bridge-pill.reconnecting i { background: var(--amber); animation: breathe 1.2s infinite; }

.collab-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 13px;
  align-items: stretch;
}

.thread-card {
  display: flex; flex-direction: column;
  height: calc(100dvh - 176px);
  min-height: 540px;
  padding: 0;
  overflow: hidden;
}

.thread-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.thread-people { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mini-ava {
  width: 28px; height: 28px; border-radius: 9px;
  display: grid; place-items: center;
  font-size: 9.5px; font-weight: 700; letter-spacing: -.02em;
  color: #fff;
  flex: none;
}
.mini-ava.dsh { background: linear-gradient(135deg, #8b5cf6, #3ddad7); }
.mini-ava.wb { background: linear-gradient(135deg, #4f8dff, #2f6bff); box-shadow: 0 0 0 2px rgba(47, 123, 255, .12); color: #fff; }
.thread-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; margin-left: 2px; }
.thread-title > :first-child { font-size: 12.5px; font-weight: 600; color: var(--text); }
.thread-title small { font-size: 10.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.run-state {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; color: var(--text-3);
  padding: 4px 9px; border-radius: 99px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.run-state i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); }
.run-state.busy { color: var(--accent); border-color: rgba(127, 157, 255, .28); background: rgba(127, 157, 255, .07); }
.run-state.busy i { background: var(--accent); animation: breathe 1.6s infinite; }

.thread {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 16px 16px 8px;
  display: flex; flex-direction: column; gap: 14px;
}
.thread-feed { display: flex; flex-direction: column; gap: 14px; }

.thread-empty { margin: auto; padding: 26px 20px; max-width: 460px; text-align: center; }
.empty-orb {
  width: 62px; height: 62px; margin: 0 auto 16px;
  border-radius: 50%;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .38), transparent 46%),
    linear-gradient(135deg, #4f8dff, #2f6bff 55%, #7c5cf0);
  box-shadow: 0 18px 40px -18px rgba(47, 107, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .4);
  color: #fff; font-size: 15px; font-weight: 700; letter-spacing: -.02em;
}
.empty-orb.off { background: linear-gradient(135deg, #3a4254, #232a38); box-shadow: none; color: var(--text-2); }
.thread-empty h3 { font-size: 15px; font-weight: 620; letter-spacing: -.01em; }
.thread-empty p { margin: 6px auto 0; max-width: 380px; font-size: 11.5px; line-height: 1.7; color: var(--text-3); }
.thread-empty.offline p b { color: var(--text-2); }
.prompt-chips { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-top: 16px; }
.prompt-chips button {
  padding: 7px 11px; border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  font-size: 10.5px; color: var(--text-2);
  transition: border-color var(--speed), color var(--speed), background var(--speed);
}
.prompt-chips button:hover { color: var(--text); border-color: rgba(127, 157, 255, .45); background: rgba(127, 157, 255, .07); }
.thread-empty .cmd {
  display: inline-block; margin-top: 14px;
  padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, .25);
  font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px;
  color: var(--cyan);
}
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .thread-empty .cmd { background: rgba(15, 23, 42, .05); }
.offline-note { font-size: 10.5px !important; color: var(--text-3); margin-top: 10px !important; }
.thread-empty .btn { margin-top: 14px; height: 32px; font-size: 11.5px; }

.msg { display: flex; gap: 9px; align-items: flex-start; }
.msg.user { justify-content: flex-end; }
.msg-ava {
  width: 27px; height: 27px; border-radius: 9px;
  display: grid; place-items: center;
  font-size: 9px; font-weight: 700; color: #fff;
  flex: none; margin-top: 1px;
}
.msg-ava.dsh { background: linear-gradient(135deg, #8b5cf6, #3ddad7); }
.msg-ava.wb { background: linear-gradient(135deg, #4f8dff, #2f6bff); }
.msg-body { max-width: 82%; min-width: 0; }
.msg.user .msg-body { align-items: flex-end; display: flex; flex-direction: column; }
.msg-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 10px; color: var(--text-3); }
.msg-meta b { color: var(--text-2); font-weight: 600; }
.msg-meta em { font-style: normal; font-size: 9px; padding: 1px 5px; border-radius: 4px; color: var(--accent); background: rgba(127, 157, 255, .12); }
.msg-meta time { margin-left: 2px; }
.msg.user .msg-meta { flex-direction: row-reverse; }
.msg.user .msg-meta time { margin-left: 0; margin-right: 2px; }
.bubble {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .045);
  font-size: 12px; line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .bubble { background: #fff; }
.msg.user .bubble {
  background: linear-gradient(135deg, rgba(127, 157, 255, .2), rgba(167, 139, 250, .14));
  border-color: rgba(127, 157, 255, .3);
}
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .msg.user .bubble { background: linear-gradient(135deg, rgba(70, 102, 245, .12), rgba(124, 92, 240, .1)); }
.bubble.error { color: #fecdd3; border-color: rgba(251, 113, 133, .35); background: rgba(251, 113, 133, .1); }
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .bubble.error { color: #9f1239; }
.bubble strong { color: var(--text); font-weight: 650; }
.bubble code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10.5px;
  padding: 1px 5px; border-radius: 4px;
  background: rgba(127, 157, 255, .1);
  color: #c7d4ff;
}
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .bubble code { color: #3350b8; background: rgba(70, 102, 245, .08); }
.msg.system { justify-content: center; }
.msg.system .sys {
  font-size: 10px; color: var(--text-3);
  padding: 3px 10px; border-radius: 99px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .045);
}
.caret {
  display: inline-block; width: 2px; height: 12px;
  margin-left: 3px; vertical-align: -1px;
  background: var(--accent);
  animation: blink 1s steps(2) infinite;
}

.tool-chip {
  display: inline-flex; align-items: center; gap: 7px;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid rgba(127, 157, 255, .22);
  border-radius: 9px;
  background: rgba(127, 157, 255, .06);
  font-size: 10px; color: var(--text-2);
}
.tool-chip .ic { width: 13px; height: 13px; color: var(--accent); }
.tool-chip code { font-family: "SFMono-Regular", Consolas, monospace; color: #c7d4ff; font-size: 10px; }
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .tool-chip code { color: #3350b8; }
.tool-chip span { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.progress-chip {
  display: inline-flex; align-items: center; gap: 9px;
  min-width: 210px; max-width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .035);
  font-size: 10.5px; color: var(--text-2);
}
.progress-chip .bar { width: 74px; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; flex: none; }
.progress-chip .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--cyan)); }
.progress-chip b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.progress-chip span:last-child { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.artifact-card {
  display: flex; align-items: center; gap: 10px;
  min-width: 220px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .04);
  transition: border-color var(--speed), background var(--speed);
}
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .artifact-card { background: #fff; }
.artifact-card:hover { border-color: rgba(127, 157, 255, .45); background: rgba(127, 157, 255, .06); }
.artifact-meta { flex: 1; min-width: 0; }
.artifact-meta b { display: block; font-size: 11px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artifact-meta small { font-size: 9.5px; color: var(--text-3); }
.artifact-card > .ic { width: 14px; height: 14px; color: var(--text-3); }

.composer {
  flex: none;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .012), transparent);
}
.handoff-chip {
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 8px;
  padding: 6px 9px;
  border: 1px solid rgba(47, 123, 255, .3);
  border-radius: 8px;
  background: rgba(47, 123, 255, .08);
  font-size: 10.5px; color: #a9c4ff;
}
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .handoff-chip { color: #2456b8; }
.handoff-chip .ic { width: 13px; height: 13px; }
.handoff-chip span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.handoff-chip button { width: 18px; height: 18px; border-radius: 5px; color: inherit; opacity: .7; }
.handoff-chip button:hover { opacity: 1; background: rgba(255, 255, 255, .1); }

.composer textarea {
  width: 100%;
  min-height: 40px; max-height: 140px;
  resize: none;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .035);
  color: var(--text);
  font: inherit; font-size: 12.5px; line-height: 1.5;
  outline: none;
  transition: border-color var(--speed), background var(--speed);
}
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .composer textarea { background: #fff; }
.composer textarea:focus { border-color: rgba(127, 157, 255, .55); background: rgba(127, 157, 255, .04); }
.composer textarea::placeholder { color: var(--text-3); }
.composer-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.composer-hint { margin-left: auto; font-size: 9.5px; color: var(--text-3); white-space: nowrap; }
.composer .btn { height: 32px; font-size: 11.5px; padding: 0 12px; }
.composer .btn:disabled { opacity: .45; cursor: not-allowed; }

.collab-side { display: flex; flex-direction: column; gap: 13px; min-width: 0; }

.wb-status-card { padding: 16px 17px; }
.wb-head { display: flex; align-items: center; gap: 10px; }
.wb-logo {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #4f8dff, #2f6bff);
  box-shadow: 0 10px 24px -12px rgba(47, 107, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.wb-who { flex: 1; min-width: 0; }
.wb-who b { display: block; font-size: 13.5px; font-weight: 620; }
.wb-who small { display: block; font-size: 10.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.wb-dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(74, 222, 128, .13); }
.wb-dot.busy { background: var(--accent); box-shadow: 0 0 0 3px rgba(127, 157, 255, .13); animation: breathe 1.6s infinite; }

.wb-rows { display: flex; flex-direction: column; margin-top: 12px; }
.wb-rows > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, .045); font-size: 11px; }
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .wb-rows > div { border-color: rgba(15, 23, 42, .06); }
.wb-rows > div:last-child { border-bottom: 0; }
.wb-rows span { color: var(--text-3); }
.wb-rows b { font-weight: 550; color: var(--text-2); max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wb-progress { height: 3px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; margin: 6px 0 12px; }
.wb-progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #4f8dff, var(--cyan)); transition: width .5s ease; }

.wb-actions { display: flex; gap: 8px; }
.wb-actions .btn { flex: 1; height: 32px; font-size: 11px; padding: 0 8px; }
.wb-actions .btn:disabled { opacity: .4; cursor: not-allowed; }
.wb-note { margin-top: 10px; font-size: 9.5px; line-height: 1.6; color: var(--text-3); }

.queue-card { padding: 14px 16px; }
.run-list { display: flex; flex-direction: column; margin-top: 8px; }
.run-item { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, .045); }
.run-item:last-child { border-bottom: 0; }
.run-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); flex: none; }
.run-item.running .run-dot { background: var(--accent); box-shadow: 0 0 8px rgba(127, 157, 255, .8); animation: breathe 1.6s infinite; }
.run-item.done .run-dot { background: var(--green); }
.run-item.error .run-dot { background: var(--rose); }
.run-item.cancelled .run-dot { background: var(--text-3); }
.run-item.queued .run-dot { background: var(--amber); }
.run-info { flex: 1; min-width: 0; }
.run-info b { display: block; font-size: 11px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-info small { display: block; font-size: 9.5px; color: var(--text-3); }
.run-mode { font-size: 9px; color: var(--text-3); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; white-space: nowrap; }
.run-empty { padding: 10px 0 4px; font-size: 10.5px; color: var(--text-3); }

.caps-card { padding: 14px 16px; }
.cap-list { display: flex; flex-direction: column; gap: 6px; margin-top: 9px; }
.cap-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 10px; color: var(--text-3); }
.cap-list code { font-family: "SFMono-Regular", Consolas, monospace; font-size: 9.5px; color: var(--text-2); }
.cap-list span { white-space: nowrap; }

.task-wb {
  position: absolute; top: 6px; right: 30px;
  width: 20px; height: 20px; border-radius: 6px;
  display: grid; place-items: center;
  color: var(--text-3); opacity: 0;
  transition: opacity var(--speed), background var(--speed), color var(--speed);
}
.task-wb .ic { width: 12px; height: 12px; }
.task-card:hover .task-wb { opacity: 1; }
.task-wb:hover { background: rgba(47, 123, 255, .16); color: #6aa0ff; }

@media (max-width: 1240px) {
  .collab-grid { grid-template-columns: minmax(0, 1fr); }
  .thread-card { height: 620px; }
  .collab-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wb-status-card { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .thread-card { height: 70vh; min-height: 480px; }
  .composer-hint { display: none; }
  .collab-side { grid-template-columns: minmax(0, 1fr); }
  .wb-status-card { grid-column: auto; }
  .msg-body { max-width: 88%; }
}

/* =========================================================
   命令面板
   ========================================================= */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 12vh 20px 20px;
  background: rgba(3, 6, 12, .62);
  backdrop-filter: blur(6px);
  animation: fade .18s ease both;
}
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .overlay { background: rgba(15, 23, 42, .28); }

.palette {
  width: min(560px, 100%);
  border: 1px solid var(--line-2); border-radius: 16px;
  background: var(--bg-2);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .06);
  overflow: hidden;
  animation: pop .2s cubic-bezier(.2, .8, .2, 1) both;
}
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .palette { background: #fff; box-shadow: 0 40px 90px -40px rgba(15, 23, 42, .5); }

.palette-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.palette-input .ic { color: var(--text-3); }
.palette-input input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 14px; color: var(--text); }
.palette-input input::placeholder { color: var(--text-3); }

.palette-list { max-height: 420px; overflow-y: auto; padding: 8px; }
.palette-group { padding: 8px 10px 4px; font-size: 10px; color: var(--text-3); letter-spacing: .08em; }
.palette-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 9px;
  font-size: 12.5px; color: var(--text-2);
  cursor: pointer;
}
.palette-item .ic { width: 16px; height: 16px; color: var(--text-3); }
.palette-item .kbd-hint { margin-left: auto; font-size: 10px; color: var(--text-3); }
.palette-item.selected, .palette-item:hover { background: rgba(127, 157, 255, .13); color: var(--text); }
.palette-item.selected .ic { color: var(--accent); }
.palette-empty { padding: 30px; text-align: center; font-size: 12px; color: var(--text-3); }
.palette-foot { display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 10px; color: var(--text-3); }
.palette-foot kbd { margin-right: 3px; }

/* =========================================================
   弹窗
   ========================================================= */
.modal {
  width: min(440px, 100%);
  padding: 20px;
  border: 1px solid var(--line-2); border-radius: 18px;
  background: var(--bg-2);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9);
  animation: pop .22s cubic-bezier(.2, .8, .2, 1) both;
}
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .modal { background: #fff; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.modal-head h3 { font-size: 15px; font-weight: 620; }
.modal-head p { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.modal-head .icon-btn { width: 30px; height: 30px; }

.field { display: block; margin-bottom: 13px; }
.field > span { display: block; font-size: 10.5px; color: var(--text-3); margin-bottom: 5px; }
.field input, .field select {
  width: 100%; height: 38px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(255, 255, 255, .035); color: var(--text);
  outline: none; font-size: 12.5px;
  transition: border-color var(--speed), background var(--speed);
}
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .field input, html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .field select { background: #fff; }
.field input:focus, .field select:focus { border-color: rgba(127, 157, 255, .6); background: rgba(127, 157, 255, .05); }
.field select option { background: var(--bg-2); color: var(--text); }
.field input::placeholder { color: var(--text-3); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }

/* =========================================================
   Toast
   ========================================================= */
.toasts {
  position: fixed; right: 22px; bottom: 22px; z-index: 200;
  display: flex; flex-direction: column; gap: 9px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 9px;
  min-width: 220px; max-width: 360px;
  padding: 11px 14px;
  border: 1px solid var(--line-2); border-radius: 11px;
  background: var(--bg-2);
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .85);
  font-size: 12px;
  animation: toastIn .28s cubic-bezier(.2, .8, .2, 1) both;
}
.toast .ic { color: var(--green); width: 16px; height: 16px; }
.toast.out { animation: toastOut .2s ease both; }

/* =========================================================
   动画
   ========================================================= */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes logIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(14px); } }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1240px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-b, .grid-c { grid-template-columns: minmax(0, 1fr); }
  .donut-flex { justify-content: flex-start; }
  .donut-legend { max-width: 220px; }
  .agent-grid, .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 0; }
  .session-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
  .app { grid-template-columns: 76px minmax(0, 1fr); }
  .brand { justify-content: center; padding: 0; }
  .brand-txt, .ws-meta, .workspace .chev, .nav-item span, .nav-label, .quota, .user-meta, .nav-item .badge { display: none; }
  .workspace { justify-content: center; padding: 7px; }
  .nav-item { justify-content: center; padding: 0; height: 44px; }
  .nav-item.active::before { left: -14px; }
  .side-foot { align-items: center; }
  .user-card { justify-content: center; padding: 6px; }
  .online-dot { display: none; }
  .search-trigger { width: 40px; padding: 0; justify-content: center; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .schedule-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .views { padding: 14px 16px; }
  .topbar { padding: 0 16px; }
  .crumbs h1 { font-size: 14px; }
  .hero { flex-direction: column; align-items: flex-start; gap: 18px; }
  .hero-progress { align-self: stretch; justify-content: space-between; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-grid, .settings-grid, .kanban { grid-template-columns: minmax(0, 1fr); }
  .view-head { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
html.no-motion *, html.no-motion *::before, html.no-motion *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
}

/* ---- 粉/红主题背景渐变（置于文件末尾以覆盖浅色组规则） ---- */
html[data-theme="pink"] .main {
  background:
    radial-gradient(900px 520px at 8% -12%, rgba(185, 116, 141, .12), transparent 62%),
    radial-gradient(760px 460px at 102% -4%, rgba(157, 107, 143, .10), transparent 60%),
    var(--bg);
}
html[data-theme="pink"] .sidebar {
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(185, 116, 141, .10), transparent 60%),
    var(--bg-2);
}
html[data-theme="red"] .main {
  background:
    radial-gradient(900px 520px at 8% -12%, rgba(238, 22, 51, .13), transparent 62%),
    radial-gradient(760px 460px at 102% -4%, rgba(238, 22, 51, .07), transparent 60%),
    var(--bg);
}
html[data-theme="red"] .sidebar {
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(238, 22, 51, .10), transparent 60%),
    var(--bg-2);
}

/* ===== 我的报表（追加样式） ===== */
.report-form { display: flex; flex-direction: column; gap: 10px; }
/* 统一输入框：与 .field input / .composer textarea 同一套设计语言 */
.report-form .input, .workbench-input {
  width: 100%;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(255, 255, 255, .035); color: var(--text);
  outline: none; font: inherit; font-size: 12.5px;
  padding: 10px 12px; line-height: 1.5;
  transition: border-color var(--speed), background var(--speed);
}
.report-form input.input { height: 38px; padding: 0 11px; }
.report-form .input::placeholder { color: var(--text-3); }
.report-form .input:focus {
  border-color: rgba(127, 157, 255, .55);
  background: rgba(127, 157, 255, .04);
}
html:is([data-theme="light"], [data-theme="pink"], [data-theme="red"]) .report-form .input { background: #fff; }
.report-form textarea.input { resize: vertical; min-height: 88px; max-height: 220px; }
.report-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 4px; border-bottom: 1px solid rgba(128,140,170,.15);
}
.report-row:last-child { border-bottom: none; }
.report-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.report-meta { font-size: 12px; color: var(--muted, #8a93aa); }
.report-result {
  padding: 12px 4px; border-bottom: 1px solid rgba(128,140,170,.15);
  display: flex; flex-direction: column; gap: 8px;
}
.report-content {
  white-space: pre-wrap; word-break: break-word;
  background: rgba(128,140,170,.08); border-radius: 10px;
  padding: 14px; font-size: 13px; line-height: 1.7;
  font-family: inherit; max-height: 420px; overflow: auto;
}
#reports-list .empty, #report-results-list .empty { padding: 18px 4px; color: var(--muted, #8a93aa); }
