/* ============================================================
   销售跟进工作台 - 样式（浅色主题 / 全内联 / 零外部依赖）
   ============================================================ */
:root {
  --bg: #f1f5f9;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --success: #16a34a;
  --success-soft: #f0fdf4;
  --warn: #f59e0b;
  --warn-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --teal: #0d9488;
  --purple: #7c3aed;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, .08);
  --sidebar-w: 236px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.ico { width: 18px; height: 18px; flex: none; }
.ico-sm { width: 14px; height: 14px; }
.ico-lg { width: 42px; height: 42px; }
.ico-lock { opacity: .55; }

/* ============ 布局 ============ */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--card);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; bottom: 0; left: 0;
  display: flex; flex-direction: column;
  z-index: 40;
}

.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }

.content { padding: 20px 24px 40px; max-width: 1280px; width: 100%; margin: 0 auto; }

/* 品牌 */
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1px solid var(--border); }
.brand-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #0ea5e9);
  color: #fff; display: flex; align-items: center; justify-content: center;
}
.brand-logo .ico { width: 20px; height: 20px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { font-size: 15px; }
.brand-text span { font-size: 11px; color: var(--muted); }

/* 导航 */
.nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 2px;
  border-radius: 8px; color: var(--text);
  font-size: 14px; transition: background .15s;
}
.nav-item:hover { background: var(--bg); color: var(--primary); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-sep { font-size: 11px; color: var(--muted); padding: 14px 12px 6px; text-transform: uppercase; letter-spacing: .5px; }

.sidebar-foot { padding: 14px; border-top: 1px solid var(--border); }
.user-chip { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
a.user-chip {
  text-decoration: none; color: inherit;
  padding: 8px; margin: -8px -8px 10px; border-radius: 10px;
  transition: background .15s;
}
a.user-chip:hover { background: var(--bg); }
a.user-chip .ico { width: 15px; height: 15px; color: var(--muted); margin-left: auto; flex: none; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--primary), #0ea5e9);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 15px;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.user-meta strong { font-size: 13px; }
.user-meta span { font-size: 11px; color: var(--muted); }
.logout-form { margin: 0; }
.logout-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 8px;
  color: var(--muted); font-size: 13px;
  width: 100%;
  background: none; border: none; cursor: pointer;
  font-family: inherit; text-align: left;
}
.logout-btn:hover { background: var(--danger-soft); color: var(--danger); }

/* 顶栏 */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px; background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.page-title { font-size: 17px; font-weight: 700; flex: 1; }
.topbar-right .today { color: var(--muted); font-size: 13px; }
.menu-btn {
  display: none; width: 44px; height: 44px;
  border: none; background: none; color: var(--text);
  align-items: center; justify-content: center; cursor: pointer;
}
.menu-btn .ico { width: 22px; height: 22px; }

.mask { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .4); z-index: 39; }
.mask.show { display: block; }

/* ============ 通用组件 ============ */
.panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 16px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.panel-title .ico { color: var(--primary); }

.muted { color: var(--muted); font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; }
.link .ico { width: 14px; height: 14px; }

/* 颜色辅助 */
.c-red { color: var(--danger); }
.c-orange { color: #ea580c; }
.c-blue { color: var(--primary); }
.c-green { color: var(--success); }
.c-gold { color: #d97706; }
.c-purple { color: var(--purple); }
.c-teal { color: var(--teal); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 16px; min-height: 40px; min-width: 40px;
  border-radius: 8px; border: 1px solid transparent;
  font-size: 14px; font-weight: 500; cursor: pointer;
  background: var(--bg); color: var(--text);
  transition: all .15s; white-space: nowrap;
}
.btn:hover { filter: brightness(.97); }
.btn .ico { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-outline { background: #fff; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.tip {
  margin-top: 14px; padding: 10px 12px; border-radius: 8px;
  background: var(--primary-soft); color: var(--muted); font-size: 12.5px; line-height: 1.6;
}
.tip-warn {
  display: flex; align-items: center; gap: 8px;
  background: #fef3c7; color: #92400e; border: 1px solid #fde68a;
}
.tip-warn .ico { width: 16px; height: 16px; flex: none; }
.btn-danger-ghost { background: transparent; color: var(--muted); }
.btn-danger-ghost:hover { background: var(--danger-soft); color: var(--danger); }
.btn-block { width: 100%; }
.btn-lg { min-height: 48px; font-size: 15px; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 13px; }
.btn-xs { min-height: 32px; min-width: 32px; padding: 0 10px; font-size: 12px; }
.btn.disabled { opacity: .45; pointer-events: none; }

/* 标签 */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 500; line-height: 1.6;
  background: var(--bg); color: var(--muted); white-space: nowrap;
}
.tag .ico { width: 12px; height: 12px; }
.tag-direct { background: var(--primary-soft); color: var(--primary); }
.tag-agent { background: #f5f3ff; color: var(--purple); }
.tag-agent-ok { background: var(--success-soft); color: var(--success); }
.tag-agent-wait { background: var(--warn-soft); color: #b45309; }
.tag-agent-off { background: var(--bg); color: var(--muted); }
.tag-overdue { background: var(--danger-soft); color: var(--danger); }
.tag-admin { background: #fdf2f8; color: #be185d; }
.tag-off { background: var(--bg); color: var(--muted); }
.tag-owner { background: var(--primary-soft); color: var(--primary); }
.tag-level-A { background: var(--danger-soft); color: var(--danger); }
.tag-level-B { background: var(--warn-soft); color: #b45309; }
.tag-level-C { background: var(--primary-soft); color: var(--primary); }
.tag-level-D { background: var(--bg); color: var(--muted); }

/* 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-grid-sm { grid-template-columns: repeat(2, 1fr); margin-bottom: 0; }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px;
  display: flex; align-items: center; gap: 12px;
}
.stat-icon {
  width: 42px; height: 42px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft);
}
.stat-icon.c-blue { background: var(--primary-soft); color: var(--primary); }
.stat-icon.c-green { background: var(--success-soft); color: var(--success); }
.stat-icon.c-gold { background: var(--warn-soft); color: #d97706; }
.stat-icon.c-orange { background: #fff7ed; color: #ea580c; }
.stat-icon.c-purple { background: #f5f3ff; color: var(--purple); }
.stat-icon.c-teal { background: #f0fdfa; color: var(--teal); }
.stat-meta { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.stat-meta b { font-size: 19px; font-weight: 700; white-space: nowrap; }
.stat-meta span { font-size: 12px; color: var(--muted); }

/* ============ 今天要处理 ============ */
.panel-due { border-top: 3px solid var(--warn); }
.due-summary { font-size: 12px; color: var(--muted); }
.due-summary b { font-size: 14px; }
.due-list { display: flex; flex-direction: column; gap: 8px; }
.due-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: #fff;
  flex-wrap: wrap;
}
.due-overdue { border-color: #fecaca; background: #fff7f7; }
.due-today { border-color: #fed7aa; background: #fffbf5; }
.due-soon { border-color: #bfdbfe; background: #f5faff; }
.due-date { display: flex; align-items: center; gap: 10px; min-width: 130px; }
.due-date b { display: block; font-size: 13px; }
.due-date small { font-size: 11px; color: var(--muted); }
.due-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.due-overdue .due-dot { background: var(--danger); box-shadow: 0 0 0 4px rgba(220, 38, 38, .15); }
.due-today .due-dot { background: #ea580c; box-shadow: 0 0 0 4px rgba(234, 88, 12, .15); }
.due-soon .due-dot { background: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
.due-main { display: flex; align-items: center; gap: 8px; flex: 1; flex-wrap: wrap; min-width: 200px; }
.due-name { font-size: 14px; }

/* ============ 表格 ============ */
.table-wrap { overflow-x: auto; padding: 0; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 14px; text-align: left; font-size: 13px; }
.table thead th { background: #f8fafc; color: var(--muted); font-weight: 600; font-size: 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table tbody tr { border-bottom: 1px solid #f1f5f9; }
.table tbody tr:last-child { border-bottom: none; }
.table tbody tr:hover { background: #f8fafc; }
.cell-name { font-weight: 600; color: var(--text); font-size: 13.5px; }
.cell-name:hover { color: var(--primary); }
.cell-sub { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.follow-date { font-weight: 600; }
.th-ops { width: 190px; }
.ops { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ops .inline { display: inline-flex; }
.inline { display: inline; }

/* 分页 */
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 18px 0 10px; }
.page-info { color: var(--muted); font-size: 13px; }

/* 筛选栏 */
.filter-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 14px; margin-bottom: 16px;
}
.filter-search { flex: 1; min-width: 200px; }
.filter-select {
  height: 40px; padding: 0 10px; border: 1px solid var(--border);
  border-radius: 8px; background: #fff; font-size: 14px; color: var(--text);
  max-width: 160px; cursor: pointer;
}
.filter-select:focus, .filter-select:focus-visible { outline: 2px solid var(--primary-soft); border-color: var(--primary); }

/* 表单 */
.form-panel { max-width: 860px; }
.form-sec {
  font-size: 13px; font-weight: 700; color: var(--muted);
  margin: 18px 0 10px; padding-bottom: 6px; border-bottom: 1px dashed var(--border);
}
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 16px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field-label { font-size: 12.5px; font-weight: 600; color: #334155; }
.field-label em { color: var(--danger); font-style: normal; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 16px; color: var(--text); background: #fff;
  font-family: inherit; transition: border-color .15s;
}
.field textarea { min-height: 80px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .ico { position: absolute; left: 12px; color: var(--muted); }
.input-wrap input, .input-wrap select { padding-left: 38px; }
.form-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* 分段选择器（客户类型） */
.seg-control { display: inline-flex; background: var(--bg); border-radius: 10px; padding: 4px; gap: 4px; margin-bottom: 12px; }
.seg-btn {
  min-height: 40px; padding: 0 22px; border: none; border-radius: 8px;
  background: transparent; color: var(--muted); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all .15s;
}
.seg-btn.active { background: #fff; color: var(--primary); box-shadow: var(--shadow); font-weight: 600; }

/* 产品多选 */
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.check-card {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; cursor: pointer; transition: all .15s;
}
.check-card:hover { border-color: var(--primary); }
.check-card.checked { border-color: var(--primary); background: var(--primary-soft); }
.check-card input { display: none; }
.check-main { flex: 1; display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.check-main b { font-size: 13px; }
.check-main small { font-size: 11px; color: var(--muted); }
.check-box {
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: transparent; flex: none;
}
.check-card.checked .check-box { background: var(--primary); border-color: var(--primary); color: #fff; }
.check-box .ico { width: 12px; height: 12px; }

/* 详情页 */
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.detail-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.detail-title-row h2 { font-size: 20px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 110px 1fr; row-gap: 10px; column-gap: 12px; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { font-size: 13.5px; min-width: 0; word-break: break-all; }
.kv-remark { white-space: pre-wrap; }

/* 产品列表（详情页） */
.prod-list { display: flex; flex-direction: column; gap: 8px; }
.prod-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.prod-icon {
  width: 36px; height: 36px; border-radius: 8px; flex: none;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.prod-main { flex: 1; display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.prod-main b { font-size: 13.5px; }
.prod-main small { font-size: 11.5px; color: var(--muted); }

/* 跟进时间线 */
.timeline { list-style: none; }
.tl-item { display: flex; gap: 14px; padding-bottom: 18px; position: relative; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: 5px; top: 16px; bottom: 0;
  width: 2px; background: var(--border);
}
.tl-item:last-child::before { display: none; }
.tl-dot {
  width: 12px; height: 12px; border-radius: 50%; background: var(--primary);
  margin-top: 5px; flex: none; z-index: 1;
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.tl-dot-电话 { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.tl-dot-微信 { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.tl-dot-拜访 { background: var(--purple); box-shadow: 0 0 0 3px #f5f3ff; }
.tl-dot-展会 { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.tl-body { flex: 1; min-width: 0; }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.tl-name { font-weight: 600; font-size: 13.5px; }
.tl-type {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px;
  background: var(--bg); color: var(--muted);
}
.tl-time { color: var(--muted); font-size: 11.5px; margin-left: auto; }
.tl-user { color: var(--muted); font-size: 12px; }
.tl-content { font-size: 13.5px; white-space: pre-wrap; word-break: break-word; }
.tl-result { font-size: 12.5px; color: var(--success); margin-top: 4px; display: flex; gap: 4px; align-items: flex-start; }
.tl-result .ico { margin-top: 3px; }
.tl-next { font-size: 12.5px; color: var(--primary); margin-top: 4px; display: flex; gap: 4px; align-items: center; }
.tl-next .ico { margin-top: 0; }
.tl-full .tl-item::before { left: 5px; }

.panel-follow { border-top: 3px solid var(--primary); }

/* 条形图 */
.bar-chart { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-label { width: 72px; font-size: 12.5px; color: var(--muted); flex: none; }
.bar-track { flex: 1; height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #0ea5e9); border-radius: 999px; transition: width .4s; min-width: 2px; }
.bar-fill-teal { background: linear-gradient(90deg, var(--teal), #2dd4bf); }
.bar-num { width: 34px; text-align: right; font-size: 12.5px; font-weight: 600; flex: none; }
.bar-chart-sm .bar-label { width: 90px; }

/* 产品卡片 */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.product-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.product-card-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.product-card-body { padding: 0 16px 14px; }
.product-card-foot { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid #f1f5f9; flex-wrap: wrap; }
.prod-price { font-size: 17px; font-weight: 700; color: var(--primary); }
.prod-price small { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.prod-remark { font-size: 12px; margin-top: 4px; min-height: 18px; }

/* 空状态 */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 40px 16px; color: var(--muted); text-align: center;
}
.empty-state .ico { color: var(--border); }
.empty-state p { font-size: 13.5px; }
.empty-state .btn { margin-top: 6px; }

/* Flash 提示 */
.flash {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 10px; margin-bottom: 16px;
  font-size: 13.5px; position: relative;
}
.flash-success { background: var(--success-soft); color: #166534; border: 1px solid #bbf7d0; }
.flash-error { background: var(--danger-soft); color: #991b1b; border: 1px solid #fecaca; }
.flash .ico { width: 18px; height: 18px; flex: none; }
.flash-close { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; color: inherit; opacity: .6; cursor: pointer; padding: 4px; }

/* 弹窗 */
.modal {
  border: none; border-radius: 14px; padding: 22px;
  max-width: 380px; width: calc(100% - 40px);
  box-shadow: var(--shadow-md); margin: auto;
}
.modal::backdrop { background: rgba(15, 23, 42, .45); }
.modal-title { font-size: 16px; margin-bottom: 6px; }

/* 工具条 */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 网格 */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.grid-2 .panel { margin-bottom: 0; }

/* 移动端底部导航 */
.bottom-nav { display: none; }

/* ============ 登录页 ============ */
.login-body { background: linear-gradient(135deg, #eff6ff 0%, #f0fdfa 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-wrap { width: 100%; max-width: 400px; }
.login-card {
  background: var(--card); border-radius: 16px; box-shadow: var(--shadow-md);
  border: 1px solid var(--border); padding: 30px 28px;
}
.login-brand { text-align: center; margin-bottom: 22px; }
.login-brand h1 { font-size: 20px; margin: 12px 0 4px; }
.login-brand p { color: var(--muted); font-size: 13px; }
.brand-logo-lg { width: 52px; height: 52px; margin: 0 auto; border-radius: 14px; }
.brand-logo-lg .ico { width: 26px; height: 26px; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-hint { font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 4px; }
.login-copy { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-2 .panel { margin-bottom: 16px; }
}

@media (max-width: 767px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-md); }
  .main { margin-left: 0; }
  .menu-btn { display: flex; }
  .content { padding: 14px 14px 90px; }
  .topbar { padding: 10px 14px; }
  .topbar-right .today { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 88px 1fr; }
  .due-item { align-items: flex-start; }
  .due-item .btn-sm { width: 100%; }
  .filter-bar { padding: 10px; }
  .filter-select { flex: 1; min-width: calc(50% - 4px); max-width: none; }
  .toolbar-actions { width: 100%; }
  .toolbar-actions .btn { flex: 1; }

  /* 表格转卡片 */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr {
    border: 1px solid var(--border); border-radius: 10px;
    margin: 0 0 10px; padding: 6px 12px;
    box-shadow: var(--shadow);
  }
  .table tbody tr:hover { background: #fff; }
  .table td {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 8px 0; border-bottom: 1px dashed #f1f5f9; font-size: 13.5px;
  }
  .table td:last-child { border-bottom: none; }
  .table td::before {
    content: attr(data-label); color: var(--muted); font-size: 12px;
    font-weight: 600; flex: none;
  }
  .table td:first-child { padding-top: 10px; }
  .table td:last-child { padding-bottom: 10px; }
  .ops { justify-content: flex-end; }
  .ops .btn-xs { min-height: 40px; }

  /* 底部导航 */
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--card); border-top: 1px solid var(--border);
    z-index: 50; padding-bottom: env(safe-area-inset-bottom);
  }
  .bn-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 0 6px; color: var(--muted); font-size: 11px;
    min-height: 52px; justify-content: center;
  }
  .bn-item .ico { width: 21px; height: 21px; }
  .bn-item.active { color: var(--primary); font-weight: 600; }

  .panel { padding: 14px; }
  .card-grid { grid-template-columns: 1fr; }
  .check-grid { grid-template-columns: 1fr; }
  .stat-meta b { font-size: 17px; }
}

@media (max-width: 420px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-actions { width: 100%; }
  .detail-actions .btn { flex: 1; }
}
