/* ==========================================================================
   跑店宝工作台 · 基础层
   柔光玻璃拟态 / 薰衣草蓝紫底 / 轻量数据密度
   ========================================================================== */

:root {
  --font-sans: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei UI", "Segoe UI", system-ui, sans-serif;
  --font-num: "HarmonyOS Sans SC", "SF Pro Display", "Segoe UI", system-ui, sans-serif;

  --ink: #1f2743;
  --ink-2: #4b5578;
  --ink-3: #6f7897;
  --muted: #919ab2;
  --muted-2: #a8b0c4;

  --accent: #6c8aff;
  --accent-2: #7d63ee;
  --accent-soft: rgba(91, 124, 250, 0.1);

  --blue: #5b8def;
  --violet: #8f7bf5;
  --mint: #3ecf9a;
  --amber: #f5b247;
  --rose: #f97b91;
  --peach: #ffaf88;

  --paper: #ffffff;
  --line: rgba(90, 103, 150, 0.1);
  --line-2: rgba(90, 103, 150, 0.16);
  --line-strong: rgba(90, 103, 150, 0.22);

  --glass: linear-gradient(155deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.62));
  --glass-soft: linear-gradient(155deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.42));
  --glass-border: rgba(255, 255, 255, 0.94);

  --shadow-xs: 0 2px 9px -4px rgba(33, 45, 98, 0.18);
  --shadow-sm: 0 10px 24px -18px rgba(35, 47, 105, 0.45);
  --shadow-md: 0 22px 50px -34px rgba(35, 47, 105, 0.5);
  --shadow-lg: 0 32px 80px -46px rgba(33, 45, 100, 0.55);

  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --sidebar-w: 264px;
  --main-offset: 292px;
  --topbar-h: 74px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.55;
  letter-spacing: 0.005em;
  background:
    radial-gradient(1200px 760px at 88% -8%, rgba(198, 216, 255, 0.78), transparent 58%),
    radial-gradient(1000px 680px at 2% -4%, rgba(222, 215, 255, 0.85), transparent 56%),
    radial-gradient(1000px 800px at -2% 102%, rgba(255, 222, 209, 0.72), transparent 58%),
    radial-gradient(1100px 760px at 102% 102%, rgba(207, 245, 235, 0.62), transparent 60%),
    linear-gradient(178deg, #f8f8ff 0%, #f3f5fd 46%, #f7f6ff 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-y: scroll;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

body.no-scroll {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4, p, ul, ol, dl, dd {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

svg {
  display: block;
  flex: none;
}

.ico {
  stroke-width: 1.7;
}

::selection {
  background: rgba(116, 133, 250, 0.22);
}

:focus-visible {
  outline: 2px solid rgba(91, 124, 250, 0.5);
  outline-offset: 2px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(130, 142, 180, 0.32) transparent;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-thumb {
  background: rgba(130, 142, 180, 0.3);
  border-radius: 999px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

/* ============================== 布局骨架 ============================== */

#app {
  position: relative;
  z-index: 1;
}

.shell {
  min-height: 100vh;
}

.main {
  margin-left: var(--main-offset);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.view {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 2px 20px 60px;
  flex: 1;
}

.page {
  animation: pageIn 0.46s cubic-bezier(0.22, 0.72, 0.24, 1) both;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================== 侧边栏 ============================== */

.sidebar {
  position: fixed;
  left: 14px;
  top: 14px;
  bottom: 14px;
  width: var(--sidebar-w);
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 18px 14px 13px;
  border-radius: 26px;
  border: 1px solid var(--glass-border);
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.93) 0%, rgba(255, 255, 255, 0.7) 55%, rgba(252, 250, 255, 0.74) 100%);
  box-shadow:
    0 30px 70px -42px rgba(42, 54, 116, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(28px) saturate(1.25);
  overflow: hidden;
}

.sidebar::before {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  left: -80px;
  top: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(155, 143, 255, 0.16), transparent 68%);
  pointer-events: none;
}

.sidebar::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -100px;
  bottom: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 186, 155, 0.17), transparent 68%);
  pointer-events: none;
}

.sidebar-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
}

.brand-card {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  padding: 7px 8px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.94), rgba(249, 248, 255, 0.68));
  box-shadow: 0 10px 24px -24px rgba(42, 54, 110, 0.65);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.brand-card:hover {
  background: #fff;
  box-shadow: 0 14px 26px -22px rgba(42, 54, 110, 0.6);
}

.brand-info {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}

.brand-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-line strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #252d49;
  white-space: nowrap;
}

.brand-info small {
  display: block;
  margin-top: 3px;
  font-size: 8.5px;
  color: #9aa2b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-chevron {
  color: #a8afc3;
  flex: none;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(142deg, #6f8cff 0%, #7c6cf7 52%, #a56cf3 100%);
  box-shadow:
    0 12px 24px -12px rgba(102, 108, 245, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  flex: none;
}

.brand-word {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand-word .line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-word strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #222a46;
  white-space: nowrap;
}

.brand-pro {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.13em;
  color: #6e71d9;
  padding: 2px 5px;
  border-radius: 5px;
  border: 1px solid rgba(127, 128, 224, 0.22);
  background: linear-gradient(135deg, #f1f2ff, #f8f0ff);
}

.brand-word small {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: #a3a9be;
  margin-top: 3px;
  white-space: nowrap;
}

.sidebar-close {
  display: none;
  margin-left: auto;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  place-items: center;
  color: #8d97af;
  background: rgba(246, 247, 253, 0.85);
  flex: none;
}

.sidebar-close:hover {
  background: #fff;
  color: #5a6480;
}

.org-card {
  margin-top: 17px;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(248, 248, 255, 0.62));
  box-shadow: 0 10px 24px -22px rgba(42, 54, 110, 0.65);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  flex: none;
}

.org-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -20px rgba(42, 54, 110, 0.6);
}

.org-avatar {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(140deg, #2c3559, #4c557c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  flex: none;
}

.org-info {
  min-width: 0;
  line-height: 1.3;
}

.org-info strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #333c5b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-info small {
  display: block;
  font-size: 9.5px;
  color: #9ba3ba;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-chevron {
  margin-left: auto;
  color: #a8afc3;
  flex: none;
}

.side-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0 -5px;
  padding: 0 5px;
  scrollbar-width: none;
}

.side-scroll::-webkit-scrollbar {
  display: none;
}

.nav-label {
  margin: 18px 10px 7px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  color: #a6adc2;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-label::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(120, 132, 175, 0.16), transparent);
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 41px;
  padding: 0 11px;
  border-radius: 12px;
  color: #5b6483;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.nav-item .ico {
  color: #8b93ad;
  transition: color 0.18s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.72);
  color: #2c3553;
}

.nav-item:hover .ico {
  color: #5d6a91;
}

.nav-item.is-active {
  color: #4356df;
  font-weight: 600;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.98), rgba(239, 243, 255, 0.9));
  box-shadow:
    0 10px 22px -18px rgba(73, 89, 196, 0.6),
    inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.nav-item.is-active .ico {
  color: #5b78f5;
}

.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 13px;
  bottom: 13px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #6e8cff, #9a72f4);
}

.nav-badge {
  margin-left: auto;
  height: 19px;
  min-width: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 9.5px;
  font-weight: 600;
  color: #8a93ab;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(125, 137, 180, 0.1);
}

.nav-item.is-active .nav-badge {
  color: #5d72e7;
  background: #f2f5ff;
  border-color: #e2e8ff;
}

.nav-badge.hot {
  color: #e26b7f;
  background: #fff2f5;
  border-color: #ffe3e9;
}

.quick-filters {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.quick-filter {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 31px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 11.5px;
  color: #6f7895;
  transition: background 0.16s ease;
}

.quick-filter:hover {
  background: rgba(255, 255, 255, 0.66);
}

.quick-filter .qdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3.5px rgba(91, 141, 239, 0.12);
  flex: none;
}

.quick-filter .qdot.rose {
  background: var(--rose);
  box-shadow: 0 0 0 3.5px rgba(249, 123, 145, 0.12);
}

.quick-filter .qdot.amber {
  background: var(--amber);
  box-shadow: 0 0 0 3.5px rgba(245, 178, 71, 0.14);
}

.quick-filter .qdot.mint {
  background: var(--mint);
  box-shadow: 0 0 0 3.5px rgba(62, 207, 154, 0.13);
}

.quick-filter b {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 600;
  color: #9ba3b9;
}

.ai-card {
  position: relative;
  margin-top: 14px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.96);
  background:
    radial-gradient(120px 90px at 100% 0%, rgba(167, 138, 255, 0.2), transparent 70%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.96), rgba(243, 240, 255, 0.88) 58%, rgba(235, 246, 255, 0.9));
  box-shadow:
    0 18px 36px -28px rgba(72, 66, 175, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
  flex: none;
}

.ai-card::after {
  content: "";
  position: absolute;
  width: 92px;
  height: 92px;
  right: -32px;
  top: -46px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(142, 120, 246, 0.28), transparent 68%);
  pointer-events: none;
}

.ai-head {
  display: flex;
  align-items: center;
  gap: 7px;
  position: relative;
  z-index: 1;
}

.ai-orb {
  width: 25px;
  height: 25px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #7e8eff, #9f6cf6);
  box-shadow: 0 6px 13px -6px rgba(119, 101, 244, 0.85);
  flex: none;
}

.ai-head strong {
  font-size: 11px;
  font-weight: 600;
  color: #4a4d7c;
}

.ai-live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 8.5px;
  font-weight: 600;
  color: #42b98d;
}

.ai-live i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #3ecf9a;
  box-shadow: 0 0 0 3px rgba(62, 207, 154, 0.14);
}

.ai-card p {
  position: relative;
  z-index: 1;
  margin: 7px 0 9px;
  font-size: 10.5px;
  line-height: 1.6;
  color: #7b7f9e;
}

.ai-card p b {
  color: #5b5f9b;
  font-weight: 600;
}

.ai-btn {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  color: #5c5fd1;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(127, 128, 218, 0.16);
  box-shadow: 0 6px 14px -12px rgba(90, 86, 200, 0.7);
  transition: background 0.18s ease, transform 0.18s ease;
}

.ai-btn:hover {
  background: #fff;
  transform: translateY(-1px);
}

.sidebar-bottom {
  margin-top: 14px;
  flex: none;
}

.today-card {
  position: relative;
  padding: 11px 12px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.96);
  background:
    radial-gradient(120px 80px at 100% 0%, rgba(160, 145, 255, 0.16), transparent 70%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.94), rgba(243, 242, 255, 0.76) 60%, rgba(238, 247, 255, 0.8));
  box-shadow:
    0 16px 32px -28px rgba(72, 66, 175, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

.tc-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tc-orb {
  width: 23px;
  height: 23px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #7e8eff, #9b72f2);
  box-shadow: 0 5px 11px -6px rgba(119, 101, 244, 0.75);
  flex: none;
}

.tc-head strong {
  font-size: 10px;
  font-weight: 600;
  color: #4c527c;
}

.tc-frac {
  margin-left: auto;
  font-size: 8.5px;
  color: #8e97ae;
  font-variant-numeric: tabular-nums;
}

.today-card .progress {
  height: 4px;
  margin: 8px 0 6px;
}

.today-card p {
  font-size: 8px;
  line-height: 1.55;
  color: #969db3;
}

.today-card p b {
  color: #5b6584;
  font-weight: 600;
}

.tc-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 27px;
  margin-top: 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.92);
  font-size: 8.5px;
  font-weight: 500;
  color: #6669cc;
  transition: background 0.16s ease;
}

.tc-link:hover {
  background: #fff;
}

.user-card {
  margin-top: 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 6px;
  border-radius: 12px;
  transition: background 0.18s ease;
  flex: none;
}

.user-card:hover {
  background: rgba(255, 255, 255, 0.6);
}

.user-meta {
  min-width: 0;
  line-height: 1.28;
}

.user-meta strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #363e5c;
}

.user-meta small {
  display: block;
  font-size: 9.5px;
  color: #9ba3b8;
}

.user-more {
  margin-left: auto;
  color: #a9b0c4;
}

/* ============================== 顶栏 ============================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  transition: background 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}

.topbar.is-scrolled {
  background: linear-gradient(180deg, rgba(248, 248, 255, 0.9), rgba(248, 248, 255, 0.68));
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(112, 124, 165, 0.08);
}

.menu-btn {
  display: none;
}

.crumb {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 12px;
  color: #9aa2b8;
  white-space: nowrap;
}

.crumb .home {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #858ea8;
}

.crumb .sep {
  color: #c3c9d8;
  font-size: 11px;
}

.crumb strong {
  font-size: 13px;
  font-weight: 600;
  color: #2a3250;
}

.sync-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 21px;
  padding: 0 8px;
  margin-left: 3px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.62);
  font-size: 9.5px;
  color: #7e88a3;
  box-shadow: 0 5px 14px -14px rgba(40, 52, 110, 0.5);
}

.sync-chip i {
  width: 4.5px;
  height: 4.5px;
  border-radius: 50%;
  background: #3ecf9a;
  box-shadow: 0 0 0 3px rgba(62, 207, 154, 0.13);
}

.topbar-spacer {
  margin-left: auto;
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 286px;
  height: 39px;
  padding: 0 11px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58));
  box-shadow: 0 8px 22px -22px rgba(38, 50, 108, 0.7);
  color: #9ba3b9;
  font-size: 11.5px;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.search-trigger:hover {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 26px -22px rgba(38, 50, 108, 0.65);
}

.search-trigger .ico {
  color: #9ba3b9;
}

.search-trigger kbd {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 20px;
  padding: 0 5px;
  border-radius: 5px;
  border: 1px solid rgba(122, 134, 174, 0.13);
  background: rgba(248, 249, 255, 0.9);
  font-family: var(--font-sans);
  font-size: 9px;
  color: #a3aabd;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar .menu-btn {
  display: none;
}

.icon-btn {
  position: relative;
  width: 37px;
  height: 37px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #78829e;
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(255, 255, 255, 0.95);
  color: #485270;
}

.icon-btn.has-dot::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fb7b90;
  box-shadow: 0 0 0 2.5px rgba(250, 248, 255, 0.95);
}

.ai-top-btn {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(243, 239, 255, 0.7));
  border-color: rgba(255, 255, 255, 0.95);
  color: #7a6ee0;
}

.ai-top-btn:hover {
  color: #6a5ad8;
}

.top-divider {
  width: 1px;
  height: 22px;
  background: rgba(120, 132, 172, 0.15);
  margin: 0 5px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 6px 0 5px;
  border-radius: 12px;
  transition: background 0.18s ease;
}

.user-chip:hover {
  background: rgba(255, 255, 255, 0.7);
}

.user-chip .name {
  font-size: 11.5px;
  font-weight: 500;
  color: #404a67;
  white-space: nowrap;
}

.user-chip .chev {
  color: #a5adc1;
}

.pop-wrap {
  position: relative;
}

.pop {
  position: absolute;
  top: calc(100% + 11px);
  right: 0;
  width: 336px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.98);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 30px 70px -36px rgba(31, 42, 94, 0.55);
  backdrop-filter: blur(20px);
  z-index: 70;
  animation: popIn 0.18s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.pop.wide {
  width: 360px;
}

.pop-head {
  display: flex;
  align-items: center;
  padding: 7px 9px 9px;
}

.pop-head strong {
  font-size: 12px;
  font-weight: 600;
  color: #333c59;
}

.pop-head button {
  margin-left: auto;
  font-size: 9.5px;
  color: #6c7cdd;
  font-weight: 500;
}

.pop-head button:hover {
  text-decoration: underline;
}

.notice-item {
  display: flex;
  gap: 9px;
  padding: 9px;
  border-radius: 11px;
  transition: background 0.16s ease;
}

.notice-item:hover {
  background: #f7f8ff;
}

.notice-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.tone-bg-blue { background: linear-gradient(140deg, #7ba1ff, #5a7bf0); }
.tone-bg-violet { background: linear-gradient(140deg, #ad98ff, #8468eb); }
.tone-bg-mint { background: linear-gradient(140deg, #66ddb4, #35bd8d); }
.tone-bg-amber { background: linear-gradient(140deg, #ffca7a, #eea63f); }
.tone-bg-rose { background: linear-gradient(140deg, #ffa3b2, #f2768d); }
.tone-bg-indigo { background: linear-gradient(140deg, #8494ff, #5f68e8); }

.notice-item .n-body {
  min-width: 0;
}

.notice-item strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #3b4461;
}

.notice-item strong i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #f87b90;
}

.notice-item p {
  font-size: 10px;
  line-height: 1.55;
  color: #8d96ad;
  margin-top: 2px;
}

.notice-item time {
  display: block;
  font-size: 9px;
  color: #b1b7c8;
  margin-top: 3px;
}

.pop-foot {
  border-top: 1px solid rgba(120, 132, 172, 0.1);
  margin-top: 6px;
  padding: 8px 8px 2px;
  text-align: center;
}

.pop-foot button {
  width: 100%;
  height: 30px;
  border-radius: 8px;
  font-size: 10px;
  color: #6b7ada;
  background: #f6f8ff;
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 36px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 11.5px;
  color: #5c6583;
}

.menu-item:hover {
  background: #f7f8ff;
  color: #3d4664;
}

.menu-item .ico {
  color: #8e97b0;
}

.menu-item.danger {
  color: #dd6b7d;
}

.menu-item.danger .ico {
  color: #e28391;
}

.menu-sep {
  height: 1px;
  background: rgba(120, 132, 172, 0.1);
  margin: 5px 4px;
}

.menu-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 9px;
}

.menu-user strong {
  display: block;
  font-size: 12px;
  color: #333c59;
}

.menu-user small {
  display: block;
  font-size: 9.5px;
  color: #9aa2b8;
}

/* ============================== 通用组件 ============================== */

.glass {
  border: 1px solid var(--glass-border);
  background: var(--glass);
  box-shadow:
    var(--shadow-md),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(22px) saturate(1.18);
}

.card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.94);
  background: linear-gradient(158deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.62));
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 37px;
  padding: 0 13px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.94);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.64));
  color: #525c7a;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 8px 20px -20px rgba(38, 50, 108, 0.7);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.btn:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -18px rgba(38, 50, 108, 0.6);
}

.btn:active {
  transform: translateY(0);
}

.btn .ico {
  color: #7f89a5;
}

.btn.primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 26px -14px rgba(94, 110, 240, 0.75);
}

.btn.primary .ico {
  color: rgba(255, 255, 255, 0.9);
}

.btn.primary:hover {
  filter: brightness(1.04) saturate(1.05);
  box-shadow: 0 16px 30px -14px rgba(94, 110, 240, 0.8);
}

.btn.ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: #7b85a1;
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: none;
}

.btn.sm {
  height: 31px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 10.5px;
}

.btn.lg {
  height: 41px;
  padding: 0 16px;
  font-size: 12px;
}

.btn.icon-only {
  width: 37px;
  padding: 0;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-soft {
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 500;
  color: #6b76dd;
  background: #f2f5ff;
  border: 1px solid #e8edff;
  transition: background 0.16s ease;
}

.btn-soft:hover {
  background: #eaf0ff;
}

.btn-danger {
  color: #e06f82;
  background: #fff5f7;
  border: 1px solid #ffe4e9;
}

.btn-danger:hover {
  background: #ffedf1;
}

.avatar {
  --av1: #8c9cff;
  --av2: #6070ee;
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex: none;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  background: linear-gradient(140deg, var(--av1), var(--av2));
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.34),
    0 3px 7px -3px rgba(47, 57, 120, 0.4);
  user-select: none;
}

.av-indigo { --av1: #8f9cff; --av2: #5f6ae8; }
.av-blue { --av1: #86b1ff; --av2: #4d7cec; }
.av-mint { --av1: #73e0ba; --av2: #2fb78a; }
.av-amber { --av1: #ffd188; --av2: #eda63a; }
.av-violet { --av1: #b69dff; --av2: #8464e8; }
.av-rose { --av1: #ffafbd; --av2: #ef748c; }
.av-teal { --av1: #7ddadf; --av2: #35b6bf; }

.avatar.xs { width: 21px; height: 21px; font-size: 8.5px; }
.avatar.sm { width: 24px; height: 24px; font-size: 9.5px; }
.avatar.md { width: 32px; height: 32px; font-size: 11.5px; }
.avatar.lg { width: 42px; height: 42px; font-size: 14px; }
.avatar.xl { width: 56px; height: 56px; font-size: 18px; }

.avatar-ring {
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 3.5px rgba(122, 134, 232, 0.28),
    0 4px 10px -4px rgba(47, 57, 120, 0.35);
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar-stack .avatar + .avatar {
  margin-left: -7px;
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.4),
    0 0 0 1.5px #fff;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 21px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}

.pill .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.pill-green { color: #22a67c; background: rgba(62, 207, 154, 0.12); }
.pill-amber { color: #d39227; background: rgba(245, 178, 71, 0.15); }
.pill-blue { color: #4e78de; background: rgba(91, 141, 239, 0.12); }
.pill-violet { color: #7d64db; background: rgba(143, 123, 245, 0.13); }
.pill-rose { color: #e3677e; background: rgba(249, 123, 145, 0.13); }
.pill-gray { color: #8b94ab; background: rgba(127, 139, 174, 0.11); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid rgba(120, 133, 175, 0.1);
  background: rgba(255, 255, 255, 0.6);
  font-size: 9.5px;
  color: #7c86a2;
  white-space: nowrap;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(115, 127, 168, 0.14), transparent);
  margin: 14px 0;
}

/* 页面标题 */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 2px 0 18px;
  flex-wrap: wrap;
}

.page-head .eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #9aa2b8;
  margin-bottom: 7px;
}

.page-head h1 {
  font-size: 23px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: #232b47;
}

.page-head p {
  font-size: 11.5px;
  color: #8c95ac;
  margin-top: 6px;
  line-height: 1.6;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.head-date {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: #8c95ac;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

/* 分节标题 */
.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 2px 14px;
  flex-wrap: wrap;
}

.section-head .title {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.section-head h2 {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: #2a324e;
}

.section-head .count {
  font-size: 10.5px;
  font-weight: 600;
  color: #8f98af;
  padding: 0 7px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.section-head .hint {
  font-size: 10px;
  color: #a1a9bd;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.section-head .spacer {
  margin-left: auto;
}

.section-head .tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 分段控件 */
.seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 2px rgba(70, 84, 140, 0.04);
}

.seg button {
  height: 27px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 10.5px;
  color: #858fa8;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.seg button:hover {
  color: #5b6580;
}

.seg button.is-active {
  color: #3f4868;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 3px 9px -6px rgba(45, 57, 115, 0.55);
  font-weight: 500;
}

.seg button .ico {
  width: 13px;
  height: 13px;
}

.seg .cnt {
  font-size: 9px;
  color: #9aa2b8;
}

.seg button.is-active .cnt {
  color: #6c7bd4;
}

/* 表单控件 */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > label {
  font-size: 10.5px;
  font-weight: 500;
  color: #7e88a2;
}

.input,
.select,
textarea.input {
  width: 100%;
  height: 37px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px solid rgba(120, 132, 172, 0.14);
  background: rgba(255, 255, 255, 0.72);
  color: #3f4867;
  font-size: 11.5px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

textarea.input {
  height: auto;
  min-height: 82px;
  padding: 10px 11px;
  resize: vertical;
  line-height: 1.6;
}

.input::placeholder {
  color: #b1b8ca;
}

.input:focus,
.select:focus {
  background: #fff;
  border-color: rgba(96, 121, 240, 0.4);
  box-shadow: 0 0 0 3px rgba(96, 121, 240, 0.1);
}

.select {
  appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa2b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

.input-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon > .ico {
  position: absolute;
  left: 11px;
  color: #9ca4b9;
  pointer-events: none;
}

.input-icon .input {
  padding-left: 33px;
}

.search-input {
  height: 35px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 5px 16px -18px rgba(40, 52, 110, 0.5);
  width: 210px;
}

.search-input:focus {
  background: #fff;
}

/* 表格 */
.table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.94);
  background: rgba(255, 255, 255, 0.5);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11.5px;
  white-space: nowrap;
}

.table thead th {
  position: sticky;
  top: 0;
  padding: 11px 14px;
  text-align: left;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #99a1b6;
  background: rgba(248, 249, 255, 0.9);
  border-bottom: 1px solid rgba(113, 125, 166, 0.09);
  backdrop-filter: blur(8px);
  z-index: 1;
}

.table thead th.sortable {
  cursor: pointer;
  user-select: none;
}

.table thead th.sortable:hover {
  color: #69748e;
}

.table thead th .sort-ind {
  display: inline-flex;
  margin-left: 4px;
  color: #b4bacb;
  vertical-align: -1px;
}

.table thead th.is-sorted .sort-ind {
  color: #6677d8;
}

.table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(113, 125, 166, 0.065);
  color: #525b78;
  vertical-align: middle;
}

.table tbody tr {
  transition: background 0.14s ease;
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.66);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr.is-selected {
  background: rgba(238, 242, 255, 0.72);
}

.cell-main {
  display: flex;
  align-items: center;
  gap: 9px;
}

.cell-main strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #333c59;
}

.cell-main small {
  display: block;
  font-size: 9.5px;
  color: #9ca4b9;
  margin-top: 1px;
}

.cell-muted {
  color: #8c95ac;
  font-size: 10.5px;
}

.cell-strong {
  font-weight: 600;
  color: #3c4461;
}

.num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.checkbox {
  width: 15px;
  height: 15px;
  border-radius: 5px;
  border: 1.5px solid rgba(122, 134, 174, 0.3);
  background: #fff;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  color: #fff;
  transition: background 0.15s ease, border-color 0.15s ease;
  flex: none;
}

.checkbox.is-checked {
  background: linear-gradient(135deg, #6d8aff, #7d63ee);
  border-color: transparent;
}

.checkbox .ico {
  width: 10px;
  height: 10px;
  opacity: 0;
}

.checkbox.is-checked .ico {
  opacity: 1;
}

/* 空状态 */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 44px 20px;
  text-align: center;
  color: #9aa2b7;
  font-size: 11px;
  border-radius: 14px;
  border: 1px dashed rgba(120, 133, 175, 0.18);
  background: rgba(255, 255, 255, 0.34);
}

.empty .empty-orb {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #8d9ac8;
  background: linear-gradient(150deg, #fff, #eef2ff);
  box-shadow: 0 10px 22px -18px rgba(44, 56, 120, 0.5);
}

.empty strong {
  font-size: 12px;
  font-weight: 600;
  color: #66708c;
}

/* 进度条 */
.progress {
  height: 5px;
  border-radius: 999px;
  background: rgba(122, 134, 174, 0.12);
  overflow: hidden;
}

.progress > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7893ff, #9b7cf6);
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.progress.green > i {
  background: linear-gradient(90deg, #5dd8b0, #3cc494);
}

/* 提示 / Toast */
.toast-root {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(460px, 88vw);
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(37, 44, 72, 0.92);
  color: #fff;
  font-size: 11.5px;
  line-height: 1.4;
  box-shadow: 0 18px 40px -18px rgba(22, 29, 55, 0.7);
  backdrop-filter: blur(12px);
  animation: toastIn 0.26s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  pointer-events: auto;
}

.toast.out {
  animation: toastOut 0.22s ease both;
}

.toast .ico {
  color: #8fe9c7;
}

.toast.tone-warn .ico {
  color: #ffd28a;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(4px) scale(0.98); }
}

/* ============================== 抽屉 / 弹层 ============================== */

.drawer-layer {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.drawer-scrim {
  position: absolute;
  inset: 0;
  background: rgba(31, 39, 74, 0.16);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.25s ease both;
}

.drawer {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(446px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.96);
  background: linear-gradient(170deg, #fff 0%, #fcfcff 60%, #fafaff 100%);
  box-shadow:
    -30px 0 90px -50px rgba(30, 41, 92, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.8);
  animation: drawerIn 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  overflow: hidden;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 20px 14px;
  flex: none;
}

.drawer-head .eyebrow {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #9da5ba;
  margin-bottom: 5px;
}

.drawer-head h2 {
  font-size: 17px;
  line-height: 1.35;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: #252d49;
}

.drawer-head p {
  font-size: 10.5px;
  color: #929bb2;
  margin-top: 4px;
  line-height: 1.5;
}

.drawer-head .close {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #8b94ac;
  background: rgba(246, 247, 253, 0.9);
  flex: none;
}

.drawer-head .close:hover {
  background: #eef1fb;
  color: #58627f;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 2px 20px 20px;
}

.drawer-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px 18px;
  border-top: 1px solid rgba(114, 126, 168, 0.09);
  background: rgba(252, 252, 255, 0.9);
  flex: none;
}

.drawer-foot .btn {
  flex: 1;
}

@keyframes drawerIn {
  from { opacity: 0; transform: translateX(26px) scale(0.995); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(31, 39, 74, 0.2);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.22s ease both;
}

.modal {
  position: relative;
  width: min(470px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.96);
  background: linear-gradient(168deg, #fff, #fbfbff);
  box-shadow: 0 40px 100px -50px rgba(25, 36, 80, 0.6);
  padding: 22px;
  animation: modalIn 0.26s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.modal.wide {
  width: min(560px, 94vw);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
}

.modal-head h2 {
  font-size: 17px;
  font-weight: 650;
  color: #252d49;
  line-height: 1.35;
}

.modal-head p {
  font-size: 10.5px;
  color: #929bb2;
  margin-top: 4px;
  line-height: 1.55;
}

.modal-head .close {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #8b94ac;
  background: #f6f7fd;
  flex: none;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(-5px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 命令面板 */
.palette-layer {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 13vh 20px 20px;
}

.palette-scrim {
  position: absolute;
  inset: 0;
  background: rgba(32, 41, 78, 0.22);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease both;
}

.palette {
  position: relative;
  width: min(600px, 94vw);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.98);
  background: rgba(255, 255, 255, 0.985);
  box-shadow: 0 46px 110px -46px rgba(24, 35, 80, 0.65);
  overflow: hidden;
  animation: modalIn 0.24s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.palette-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 17px;
  border-bottom: 1px solid rgba(113, 125, 166, 0.09);
}

.palette-input .ico {
  color: #8e98b2;
}

.palette-input input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
  color: #333c59;
}

.palette-input input::placeholder {
  color: #adb4c7;
}

.palette-input kbd {
  height: 21px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  border: 1px solid rgba(121, 133, 173, 0.14);
  background: #f8f9ff;
  font-size: 8.5px;
  color: #a4abbd;
}

.palette-body {
  max-height: 52vh;
  overflow-y: auto;
  padding: 7px;
}

.palette-group-label {
  padding: 8px 10px 5px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #a7aec1;
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  color: #566080;
  transition: background 0.14s ease;
}

.palette-item.is-selected {
  background: #f3f6ff;
}

.palette-item .p-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f4f6fd;
  color: #7c89ad;
  flex: none;
}

.palette-item .p-body {
  min-width: 0;
  flex: 1;
}

.palette-item strong {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: #3a4360;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.palette-item small {
  display: block;
  font-size: 9.5px;
  color: #9ba3b8;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.palette-item .p-type {
  font-size: 8.5px;
  color: #a4abbd;
  background: #f7f8fd;
  padding: 2px 6px;
  border-radius: 5px;
  flex: none;
}

.palette-empty {
  padding: 36px 20px;
  text-align: center;
  font-size: 11px;
  color: #9ba3b8;
}

.palette-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 15px;
  border-top: 1px solid rgba(113, 125, 166, 0.09);
  font-size: 8.5px;
  color: #aab1c3;
  background: #fcfcff;
}

.palette-foot span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.palette-foot kbd {
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(121, 133, 173, 0.14);
  background: #fff;
  font-size: 8px;
}

/* 工具类 */
.muted { color: var(--muted); }
.small { font-size: 10.5px; }
.tnum { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }
.hidden { display: none !important; }

.sidebar-scrim {
  display: none;
}

/* ============================== 响应式 ============================== */

@media (max-width: 1420px) {
  :root {
    --sidebar-w: 248px;
    --main-offset: 272px;
  }

  .view {
    padding-left: 18px;
    padding-right: 18px;
  }

  .topbar {
    padding: 0 18px;
  }

  .search-trigger {
    width: 250px;
  }
}

@media (max-width: 1180px) {
  .search-trigger {
    width: 210px;
  }

  .search-trigger kbd {
    display: none;
  }

  .user-chip .name {
    display: none;
  }
}

@media (max-width: 1080px) {
  :root {
    --main-offset: 0px;
  }

  .sidebar {
    width: 268px;
    transform: translateX(calc(-100% - 20px));
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 110;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(31, 39, 74, 0.18);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  body.sidebar-open .sidebar-scrim {
    opacity: 1;
    visibility: visible;
  }

  .topbar .menu-btn {
    display: grid;
  }

  .sidebar-close {
    display: grid;
  }

  .main {
    margin-left: 0;
  }

  .view {
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  .view {
    padding: 0 14px 44px;
  }

  .topbar {
    padding: 0 14px;
    gap: 8px;
    height: 68px;
  }

  .crumb .home span,
  .crumb .sep {
    display: none;
  }

  .sync-chip {
    display: none;
  }

  .search-trigger {
    width: 37px;
    min-width: 37px;
    padding: 0;
    justify-content: center;
  }

  .search-trigger span,
  .search-trigger kbd {
    display: none;
  }

  .top-divider {
    display: none;
  }

  .user-chip .chev {
    display: none;
  }

  .page-head {
    margin-bottom: 16px;
  }

  .page-head h1 {
    font-size: 20px;
  }

  .page-head p {
    font-size: 10.5px;
  }

  .drawer {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
    animation: sheetIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  @keyframes sheetIn {
    from { transform: translateY(40px); opacity: 0.6; }
    to { transform: translateY(0); opacity: 1; }
  }

  .palette-layer {
    padding: 8vh 12px 12px;
  }
}

@media (max-width: 460px) {
  .ai-top-btn {
    display: none;
  }

  .top-actions {
    gap: 2px;
  }

  .user-chip {
    padding: 0 2px;
  }
}
