@charset "utf-8";
/* base.css — 设计令牌、背景光场、排版、通用工具类
   视觉语言：macOS Liquid Glass（液态玻璃）— 半透明材质、层叠光影、空间景深
   注意：本文件只负责外观，不改变任何结构或行为 */

:root {
  color-scheme: light;

  /* 底色与材质 */
  --bg: #e4e8f0;
  --bg-elevated: #ffffff;
  --bg-soft: rgba(255, 255, 255, 0.42);
  --glass: rgba(255, 255, 255, 0.5);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-thin: rgba(255, 255, 255, 0.3);
  --glass-border: rgba(255, 255, 255, 0.72);
  --glass-blur: blur(28px) saturate(190%);
  --glass-blur-soft: blur(16px) saturate(160%);
  --glass-inner: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --glass-edge: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  --field: rgba(255, 255, 255, 0.56);
  --field-border: rgba(255, 255, 255, 0.7);

  /* 文字 */
  --text: #16181d;
  --text-soft: #4b525d;
  --text-mute: #868e9c;

  /* 线与分隔 */
  --border: rgba(18, 28, 45, 0.09);
  --border-strong: rgba(18, 28, 45, 0.16);

  /* 强调色与语义色 */
  --accent: #2f6ae4;
  --accent-2: #79a4ff;
  --accent-soft: rgba(47, 106, 228, 0.1);
  --accent-ring: rgba(47, 106, 228, 0.26);
  --danger: #cf3f3f;
  --danger-soft: rgba(207, 63, 63, 0.1);
  --warn: #a9761b;
  --warn-soft: rgba(214, 158, 46, 0.14);
  --ok: #1c8a58;
  --ok-soft: rgba(28, 138, 88, 0.12);

  /* 光影：近实远虚，模拟真实景深 */
  --shadow-xs: 0 1px 2px rgba(18, 28, 45, 0.06);
  --shadow-sm: 0 2px 4px rgba(18, 28, 45, 0.05), 0 10px 26px rgba(18, 28, 45, 0.09);
  --shadow: 0 2px 6px rgba(18, 28, 45, 0.06), 0 18px 44px rgba(18, 28, 45, 0.11);
  --shadow-lg: 0 4px 12px rgba(15, 25, 45, 0.09), 0 34px 80px rgba(15, 25, 45, 0.2);

  /* 圆角与节奏 */
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius: 18px;
  --radius-sm: 11px;
  --radius-xs: 8px;
  --sidebar-w: 218px;
  --sidebar-w-collapsed: 68px;
  --ease: cubic-bezier(0.22, 0.72, 0.22, 1);
}

* { box-sizing: border-box; }

html { height: 100%; background: #e4e8f0; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable", "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 背景光场：抽象色雾，为玻璃材质提供可折射的底色（不含任何具象元素） */
body {
  height: 100%;
  background-color: #e4e8f0;
  background-image:
    radial-gradient(46% 40% at 6% -4%, rgba(104, 146, 255, 0.55), rgba(104, 146, 255, 0) 62%),
    radial-gradient(38% 36% at 98% 0%, rgba(255, 152, 156, 0.42), rgba(255, 152, 156, 0) 64%),
    radial-gradient(50% 46% at 96% 94%, rgba(78, 198, 186, 0.4), rgba(78, 198, 186, 0) 66%),
    radial-gradient(42% 42% at 20% 90%, rgba(158, 133, 255, 0.36), rgba(158, 133, 255, 0) 68%),
    radial-gradient(46% 40% at 52% 42%, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 74%),
    linear-gradient(165deg, #eef2f9 0%, #e2e7f0 48%, #e9edf5 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

h1, h2, h3, h4 { margin: 0; font-weight: 650; line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { margin: 0; padding: 0; list-style: none; }

button { font-family: inherit; font-size: 13.5px; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 13.5px; color: var(--text); }
::selection { background: var(--accent-ring); }

/* 滚动条：细、半透明，像系统覆盖式指示条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb {
  background: rgba(40, 52, 72, 0.2);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(40, 52, 72, 0.34); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* 工具类 */
.muted { color: var(--text-mute); }
.soft { color: var(--text-soft); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gap-6 { gap: 6px; }
.gap-10 { gap: 10px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-12 { margin-top: 12px; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.pre-wrap { white-space: pre-wrap; word-break: break-word; }

/* 数字统一等宽，避免跳动 */
.kpi-value, .cal-date, .memo-time, .row-meta, .table td .num {
  font-variant-numeric: tabular-nums;
}

/* 不支持毛玻璃时退回为更实的材质，保证可读性 */
@supports not ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
  :root {
    --glass: rgba(255, 255, 255, 0.9);
    --glass-strong: rgba(255, 255, 255, 0.96);
    --glass-thin: rgba(255, 255, 255, 0.78);
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
