/* style.css — 全局入口（仅导入设计令牌） */
/* ============================================================
   个人助手 — 全局设计令牌 (Design Tokens)
   基于 UI 设计稿：登录页 / 功能面板页 / 统计结果页
   ============================================================ */

:root {
  /* ---- 色彩 ---- */
  --bg-page: #f5f3f0;           /* 暖白页面底色 */
  --bg-surface: #ffffff;         /* 卡片/面板底色 */
  --bg-input: #fafafa;           /* 输入框底色 */
  --bg-glass: rgba(255,255,255,0.72);  /* 毛玻璃 */

  --text-primary: #1a1a1a;       /* 主文字（标题、正文） */
  --text-secondary: #8e8e93;     /* 次要文字（说明、占位） */
  --text-tertiary: #b0b0b0;      /* 辅助文字（提示、禁用） */
  --text-inverse: #ffffff;       /* 反色文字（深色背景上） */

  --border-light: rgba(0,0,0,0.06);     /* 轻边框 */
  --border-medium: rgba(0,0,0,0.10);    /* 中边框 */
  --border-input: rgba(0,0,0,0.08);     /* 输入框边框 */

  --color-primary: #1a1a1a;      /* 主按钮/强调 */
  --color-danger: #e74c3c;        /* 危险/删除 */
  --color-success: #16a34a;       /* 成功 */
  --color-warning: #e67e22;       /* 警告/法务模块 */
  --color-info: #4a90d9;          /* 信息/链接 */

  /* 模块色（保留原有，用于图标/点缀） */
  --mod-hr: #4a90d9;
  --mod-legal: #e67e22;
  --mod-finance: #27ae60;
  --mod-news: #8e44ad;
  --mod-work: #2c3e50;

  /* ---- 圆角 ---- */
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 22px;
  --radius-xl: 26px;
  --radius-pill: 9999px;

  /* ---- 阴影 ---- */
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.03);
  --shadow-md: 0 2px 12px rgba(0,0,0,0.05);
  --shadow-lg: 0 8px 28px rgba(0,0,0,0.10);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.04);

  /* ---- 字体 ---- */
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, Consolas, monospace;

  --text-xs: 0.7rem;     /* 11.2px */
  --text-sm: 0.8rem;     /* 12.8px */
  --text-base: 0.95rem;  /* 15.2px */
  --text-md: 1.05rem;    /* 16.8px */
  --text-lg: 1.25rem;    /* 20px */
  --text-xl: 1.5rem;     /* 24px */
  --text-xxl: 2rem;      /* 32px */

  /* ---- 间距 ---- */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;

  /* ---- 布局常量 ---- */
  --topbar-h: 52px;
  --bottomnav-h: 64px;
  --sidebar-w: 220px;
  --max-content: 720px;

  /* ---- 过渡 ---- */
  --ease-out: cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-fast: 0.15s var(--ease-out);
  --transition-normal: 0.25s var(--ease-out);
}

/* ---- 全局 Reset ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-page);
  overflow-x: hidden;
}

#app {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ---- 通用组件类（可选复用）---- */
.glass-bar {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius-xl);
  padding: 0.75rem 1.5rem;
  font-size: var(--text-base);
  font-weight: 600;
  transition: all var(--transition-fast);
}
.pill-btn:active { transform: scale(0.97); }
.pill-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
}

.pill-input {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-xl);
  padding: 0.85rem 1.1rem;
  font-size: var(--text-base);
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-fast);
}
.pill-input::placeholder { color: var(--text-tertiary); }
.pill-input:focus {
  background: var(--bg-surface);
  border-color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}
