/* ============================================
   个人事务工具站 · 全局设计系统
   风格：科技明亮（靛蓝紫主色 + 糖果色 + 22px大圆角）
   基于：科技明亮风格模板 + Impeccable 设计原则
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&family=ZCOOL+KuaiLe&family=Ma+Shan+Zheng&display=swap');

/* ---------- CSS 变量（浅色基底）---------- */
:root {
  /* 底色 */
  --bg-base: #F7F7FB;
  --surface: #FFFFFF;
  --surface-2: #F3F6FF;
  --surface-3: #F0F4FF;

  /* 文字 */
  --text: #11131A;
  --muted: #4B5168;
  --faint: #7B819F;
  --text-inv: #FFFFFF;

  /* 边框与分割 */
  --border: #E2E6F1;
  --border-light: #EEF0FA;
  --divider: rgba(99,102,241,.08);

  /* 主色系 */
  --primary: #6366F1;
  --primary-soft: rgba(99,102,241,.10);
  --primary-hover: #5153D9;
  --accent: #8B5CF6;
  --accent-soft: rgba(139,92,246,.10);
  --orange: #F97316;
  --orange-soft: rgba(249,115,22,.10);

  /* 状态色 */
  --green: #22C55E;
  --green-soft: rgba(34,197,94,.10);
  --red: #EF4444;
  --red-soft: rgba(239,68,68,.10);
  --amber: #F59E0B;
  --amber-soft: rgba(245,158,11,.10);
  --teal: #14B8A6;
  --teal-soft: rgba(20,184,166,.10);
  --pink: #EC4899;
  --pink-soft: rgba(236,72,153,.10);
  --blue: #3B82F6;
  --blue-soft: rgba(59,130,246,.10);

  /* 圆角 */
  --r-card: 22px;
  --r-mid: 16px;
  --r-sm: 10px;
  --r-pill: 999px;

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(18,26,80,.04), 0 4px 12px rgba(18,26,80,.04);
  --shadow-md: 0 1px 2px rgba(18,26,80,.04), 0 8px 28px rgba(18,26,80,.07);
  --shadow-lg: 0 12px 40px rgba(18,26,80,.12);
  --shadow-hover: 0 16px 48px rgba(18,26,80,.14);

  /* 间距 */
  --sp-xs: 4px; --sp-sm: 8px; --sp-md: 12px;
  --sp-lg: 16px; --sp-xl: 18px; --sp-2xl: 22px;
  --sp-3xl: 24px; --sp-4xl: 30px; --sp-5xl: 52px; --sp-sec: 64px;

  /* 布局 */
  --max-w: 1240px;
  --nav-h: 62px;

  /* 动效 */
  --ease-out: cubic-bezier(.25,.46,.45,.94);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --trans-fast: .18s var(--ease-out);
  --trans-norm: .28s var(--ease-out);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'ZCOOL KuaiLe', 'Yuanti SC', '圆体-简', 'PingFang SC', sans-serif;
  background: var(--bg-base); color: var(--text);
  line-height: 1.7; font-size: 22px; letter-spacing: .02em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; transition: color var(--trans-fast); }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
input, select, textarea {
  font-family: inherit; font-size: inherit;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  padding: 9px 13px; background: var(--surface); color: var(--text);
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
::placeholder { color: var(--faint); }

/* ---------- 导航栏 ---------- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(247,247,251,.82);
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'ZCOOL KuaiLe','Yuanti SC','圆体-简','PingFang SC',sans-serif;
  font-size: 24px; font-weight: 400; letter-spacing: .5px;
}
.nav-brand svg { width: 28px; height: 28px; flex-shrink: 0; }
.nav-links { display: flex; gap: 2px; flex-wrap: nowrap; overflow-x: auto; }
.nav-links::-webkit-scrollbar { height: 0; }
.nav-link {
  padding: 6px 11px; border-radius: var(--r-pill);
  font-family: 'ZCOOL KuaiLe','Yuanti SC','圆体-简','PingFang SC',sans-serif;
  font-size: 16px; font-weight: 400; color: var(--muted);
  transition: all var(--trans-fast); position: relative;
  white-space: nowrap; flex-shrink: 0;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* 移动端汉堡菜单 */
.nav-toggle { display: none; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: var(--r-sm); }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); position: relative; transition: all .3s; }
.nav-toggle span::before, .nav-toggle span::after {
  content:''; position: absolute; left: 0; width: 100%; height: 2px; background: var(--text);
  transition: all .3s;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ---------- Hero 区域 ---------- */
.hero-wrap { position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.hero-bg svg { width: 100%; height: 100%; object-fit: cover; }
.hero-content {
  position: relative; z-index: 1;
  padding: calc(var(--sp-sec) + 40px) 0 var(--sp-sec);
  text-align: center;
}
.hero-title {
  font-size: clamp(34px, 5vw, 54px); font-weight: 700;
  letter-spacing: -1.6px; line-height: 1.15;
  background: linear-gradient(135deg, var(--primary) 30%, var(--accent) 70%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 16px;
}
.hero-sub { font-size: clamp(18px, 2.4vw, 21px); color: var(--muted); max-width: 560px; margin: 0 auto 36px; line-height: 1.6; }

/* 统计卡 */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; max-width: 900px; margin: 0 auto; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 22px 24px;
  box-shadow: var(--shadow-sm); transition: all var(--trans-norm);
  position: relative; overflow: hidden;
}
.stat-card::before {
  content:''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--orange));
  opacity: 0; transition: opacity var(--trans-norm);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card:hover::before { opacity: 1; }
.stat-num { font-size: 32px; font-weight: 800; letter-spacing: -1px; color: var(--text); }
.stat-label { font-size: 16px; color: var(--muted); margin-top: 4px; font-weight: 500; }

/* ---------- 卡片通用 ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); box-shadow: var(--shadow-sm);
  transition: all var(--trans-norm);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #C7D2FE; }

/* 工具入口卡片 */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.tool-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 26px 24px;
  box-shadow: var(--shadow-sm); transition: all var(--trans-norm);
  cursor: pointer; display: flex; flex-direction: column; gap: 14px;
  position: relative; overflow: hidden;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #C7D2FE; }
.tool-card::after {
  content:''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--card-color, var(--primary)), transparent);
  opacity: 0; transition: opacity var(--trans-norm);
}
.tool-card:hover::after { opacity: 1; }
.tool-icon {
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
  background: var(--card-bg, var(--primary-soft));
}
.tool-name { font-size: 20px; font-weight: 700; letter-spacing: 0; }
.tool-desc { font-size: 18px; color: var(--muted); line-height: 1.55; flex: 1; }
.tool-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 700; align-self: flex-start;
  background: var(--tag-bg, var(--primary-soft));
  color: var(--tag-color, var(--primary));
}

/* ---------- 徽章 / 标签 pill ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 13px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 700; white-space: nowrap;
}
.badge-red { background: linear-gradient(135deg,#FCA5A5,#EF4444); color: #fff; }
.badge-org { background: linear-gradient(135deg,#FDBA74,#F97316); color: #fff; }
.badge-yel { background: linear-gradient(135deg,#FDE047,#EAB308); color: #2A2400; }
.badge-grn { background: linear-gradient(135deg,#86EFAC,#22C55E); color: #052E16; }
.badge-blu { background: linear-gradient(135deg,#93C5FD,#3B82F6); color: #fff; }
.badge-pur { background: linear-gradient(135deg,#D8B4FE,#A855F7); color: #fff; }
.badge-pin { background: linear-gradient(135deg,#F9A8D4,#EC4899); color: #fff; }
.badge-teal { background: linear-gradient(135deg,#5EEAD4,#14B8A6); color: #fff; }
.badge-gray { background: #E2E6F1; color: var(--muted); }

/* 状态标签 */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.dot-active { background: var(--green); }
.dot-pending { background: var(--amber); }
.dot-done { background: var(--blue); }
.dot-blocked { background: var(--red); }
.dot-idea { background: var(--pink); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; border-radius: var(--r-mid);
  font-size: 18px; font-weight: 600; letter-spacing: 0;
  transition: all var(--trans-fast); white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; box-shadow: 0 2px 8px rgba(99,102,241,.28);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(99,102,241,.38); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1.5px solid var(--border); }
.btn-secondary:hover { background: var(--surface-3); border-color: var(--primary); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #DC2626; }
.btn-ghost { color: var(--muted); padding: 8px 14px; }
.btn-ghost:hover { color: var(--primary); background: var(--primary-soft); }
.btn-sm { padding: 7px 16px; font-size: 16px; border-radius: var(--r-sm); }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: var(--r-sm); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-card); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 20px; }
thead th {
  background: var(--surface-2); padding: 12px 16px;
  text-align: left; font-weight: 600; font-size: 18px;
  color: var(--muted); letter-spacing: -.1px;
  border-bottom: 1.5px solid var(--border);
}
tbody td { padding: 11px 16px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #F7F9FF; }

/* ---------- 表单（增强版）---------- */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: flex; align-items: center; gap: 5px;
  font-size: 16px; font-weight: 600;
  color: var(--muted); margin-bottom: 8px; letter-spacing: .02em;
  text-transform: none; font-size: 16px;
}
.form-group label .req { color: var(--red); margin-left: 1px; }
.form-group label .label-icon { font-size: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* 输入框 — 柔和底色 + 舒适内边距 + 撑满宽度 */
input, select, textarea {
  font-family: inherit; font-size: 18px;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  padding: 12px 16px; background: #FAFBFF; color: var(--text);
  transition: all var(--trans-fast); outline: none;
  line-height: 1.5;
  width: 100%;
  box-sizing: border-box;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.10), 0 1px 4px rgba(99,102,241,.08);
  background: #fff;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
select { appearance: none; 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='%239CA3AF' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; cursor: pointer; }
::placeholder { color: var(--faint); font-size: 16px; }

/* 带 datalist 的输入框 → 仿下拉箭头 */
input[list] {
  appearance: none; -webkit-appearance: none;
  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='%239CA3AF' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 36px; cursor: pointer;
}

/* 弹窗内表单特殊样式 */
.modal input,
.modal select,
.modal textarea {
  background: #F8F9FE;
  border-color: #E8ECF6;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 18px;
  width: 100%;
}
.modal input:focus,
.modal select:focus,
.modal textarea:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.10), 0 2px 8px rgba(99,102,241,.06);
}

/* 表单分区卡片 */
.form-section {
  background: linear-gradient(135deg, #FAFBFF, #F7F8FC);
  border: 1px solid #EEF0FA;
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 20px;
}
.form-section-title {
  font-size: 17px; font-weight: 700; text-transform: none;
  letter-spacing: .04em; color: var(--primary);
  margin-bottom: 18px; display: flex; align-items: center; gap: 8px;
}
.form-section .form-group { margin-bottom: 16px; }
.form-section .form-group:last-child { margin-bottom: 0; }

/* 分隔线 */
.form-divider {
  height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 20px 0; border: none;
}

/* ---------- 弹窗/模态框（增强版）---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(17,19,26,.45); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.show { display: flex; animation: modalOverlayIn .25s ease; }
@keyframes modalOverlayIn { from{opacity:0} to{opacity:1} }

.modal {
  background: var(--surface); border-radius: 20px;
  width: 100%; max-width: 720px; max-height: 82vh;
  display: flex; flex-direction: column;
  box-shadow:
    0 0 0 1px rgba(99,102,241,.06),
    0 25px 70px rgba(17,19,26,.18),
    0 10px 30px rgba(17,19,26,.08);
  animation: modalIn .35s cubic-bezier(.22,1,.36,1);
  position: relative;
}
@keyframes modalIn {
  from { transform: translateY(16px) scale(.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* 弹窗顶部装饰条 */
.modal::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px; border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--pink));
}

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 30px 0; gap: 12px;
  flex-shrink: 0;
}
.modal-title {
  font-size: 22px; font-weight: 700; letter-spacing: 0;
  display: flex; align-items: center; gap: 10px;
  color: var(--text);
}
.modal-title .title-emoji { font-size: 23px; }
.modal-close {
  width: 36px; height: 36px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  color: var(--faint); font-size: 18px; transition: all var(--trans-fast);
  flex-shrink: 0;
}
.modal-close:hover { background: #FEE2E2; color: var(--red); transform: rotate(90deg); }

.modal-body { padding: 24px 30px; flex: 1; overflow-y: auto; min-height: 0; }

.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 20px 30px 26px;
  background: linear-gradient(180deg, transparent, #FAFBFF);
  border-radius: 0 0 20px 20px;
  flex-shrink: 0;
}

/* ---------- Tab 切换 ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border-light); margin-bottom: 22px; overflow-x: auto; }
.tab {
  padding: 10px 18px; font-size: 18px; font-weight: 500;
  color: var(--muted); border-bottom: 2px solid transparent;
  margin-bottom: -2px; cursor: pointer; transition: all var(--trans-fast);
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }

/* ---------- 筛选栏 ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 16px 20px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-card);
  margin-bottom: 18px;
}
.filter-bar input, .filter-bar select {
  width: auto; min-width: 140px; max-width: 200px;
}
.search-input-wrapper { position: relative; flex: 1; min-width: 200px; }
.search-input-wrapper input { width: 100%; padding-left: 36px; }
.search-icon {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--faint); font-size: 15px; pointer-events: none;
}

/* ---------- 空状态 ---------- */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--faint);
}
.empty-state svg { width: 64px; height: 64px; margin-bottom: 16px; opacity: .35; }
.empty-state p { font-size: 18px; margin-top: 8px; }

/* ---------- Toast 提示 ---------- */
.toast-container {
  position: fixed; top: 76px; right: 20px; z-index: 300;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 12px 18px; border-radius: var(--r-mid);
  font-size: 16px; font-weight: 500; color: #fff;
  box-shadow: var(--shadow-md); animation: slideInRight .3s var(--ease-spring);
  display: flex; align-items: center; gap: 8px;
  max-width: 360px;
}
.toast-success { background: var(--green); }
.toast-error { background: var(--red); }
.toast-info { background: var(--primary); }
.toast-warn { background: var(--amber); }

/* ---------- 页面容器 ---------- */
.page-wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section-title {
  font-size: 24px; font-weight: 700; letter-spacing: -.6px;
  margin-bottom: 6px; color: var(--text);
}
.section-sub { font-size: 18px; color: var(--muted); margin-bottom: 24px; }

/* ---------- 页面头部（子页）---------- */
.page-header {
  padding: 32px 0 24px; display: flex; align-items: flex-end;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.page-header h1 { font-size: 28px; font-weight: 700; letter-spacing: -.6px; }
.page-header p { font-size: 18px; color: var(--muted); margin-top: 4px; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }

/* ---------- Section 分隔 ---------- */
section { padding: var(--sp-sec) 0; }
.section-alt { background: linear-gradient(180deg, var(--alt-from, #F0F4FF), var(--alt-to, #F7F7FB)); margin: 0 -24px; padding-left: 24px; padding-right: 24px; border-radius: var(--r-card); }

/* ---------- 进度条 ---------- */
.progress-bar {
  height: 6px; background: var(--border); border-radius: var(--r-pill); overflow: hidden;
}
.progress-fill { height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .4s var(--ease-out); }

/* ---------- 日历热力图 ---------- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-cell {
  aspect-ratio: 1; border-radius: 4px; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 500; cursor: default; transition: transform var(--trans-fast);
}
.cal-cell:hover { transform: scale(1.2); z-index: 1; }
.cal-empty { background: transparent; }
.cal-today { outline: 2px solid var(--primary); outline-offset: -1px; }

/* ---------- 动画关键帧 ---------- */
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
@keyframes fadeOut { from{opacity:1} to{opacity:0} }
@keyframes slideUp { from{transform:translateY(20px);opacity:0} to{transform:translateY(0);opacity:1} }
@keyframes slideInRight { from{transform:translateX(40px);opacity:0} to{transform:translateX(0);opacity:1} }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .page-wrap { padding: 0 18px; }
  .navbar { padding: 0 18px; }
  section.alt, .section-alt { margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
}

@media (max-width: 768px) {
  /* 导航：折叠为汉堡菜单 */
  .navbar { padding: 0 16px; }
  .nav-links { display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; background: rgba(247,247,251,.97); backdrop-filter: blur(14px); flex-direction: column; padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .nav-links.show { display: flex; }
  .nav-toggle { display: flex; }

  /* 首页 */
  .hero-title { font-size: 30px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .tool-grid { grid-template-columns: 1fr; }

  /* 页面头部与操作按钮：换行不溢出屏幕 */
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .page-actions { display: flex; flex-wrap: wrap; width: 100%; gap: 8px; flex-shrink: 1; }
  .page-actions .btn { flex: 1 1 auto; min-width: 120px; }
  .page-actions .template-link { width: 100%; text-align: center; padding: 8px 0; }

  /* 筛选栏：纵向铺满 */
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar input, .filter-bar select { width: 100%; min-width: 0; max-width: none; }
  .search-input-wrapper { min-width: auto; width: 100%; }

  /* 表单双列改单列 */
  .form-row { grid-template-columns: 1fr; }

  /* 弹窗：手机上近乎全屏、可滚动 */
  .modal-overlay { padding: 10px; align-items: stretch; }
  .modal { max-width: 100%; max-height: calc(100vh - 20px); border-radius: 18px; }
  .modal-head { padding: 20px 18px 0; }
  .modal-body { padding: 18px; }
  .modal-foot { padding: 14px 18px 18px; flex-direction: column; gap: 8px; }
  .modal-foot .btn { width: 100%; }
  .modal input, .modal select, .modal textarea { font-size: 16px; padding: 12px 14px; }
  .form-section { padding: 16px; }
  .form-section-title { font-size: 16px; }

  /* 表格：缩小内边距，横向滚动更顺手 */
  table { font-size: 17px; }
  thead th, tbody td { padding: 10px 12px; }

  section { padding: 36px 0; }
  .section-alt { margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 26px; }
  .stats-row { grid-template-columns: 1fr; }
  .page-wrap { padding: 0 12px; }
  /* 小屏弹窗完全全屏，杜绝边缘留白与横向滚动 */
  .modal-overlay { padding: 0; align-items: stretch; }
  .modal { border-radius: 14px; max-height: 100vh; height: 100vh; }
  .modal-head { padding: 18px 14px 0; }
  .modal-body { padding: 14px; }
  .modal-foot { padding: 12px 14px 16px; }
  .modal input, .modal select, .modal textarea { font-size: 16px; }
  .form-section { padding: 14px; }
}

/* ---------- 工具类 ---------- */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-faint { color: var(--faint); }
.text-primary { color: var(--primary); }
.text-orange { color: var(--orange); }
.text-green { color: var(--green); }
.text-teal { color: var(--teal, #14B8A6); }
.text-link { color: var(--primary); text-decoration: none; cursor: pointer; }
.text-link:hover { text-decoration: underline; }
.text-red { color: var(--red); }
.mt-sm { margin-top: var(--sp-sm); }
.mt-md { margin-top: var(--sp-md); }
.mt-lg { margin-top: var(--sp-lg); }
.mb-sm { margin-bottom: var(--sp-sm); }
.mb-md { margin-bottom: var(--sp-md); }
.mb-lg { margin-bottom: var(--sp-lg); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--sp-sm); }
.gap-md { gap: var(--sp-md); }
.gap-lg { gap: var(--sp-lg); }
.w-full { width: 100%; }
.hidden { display: none !important; }
