/* ==========================================================================
   签约管理系统 - 设计令牌 & 基础样式
   配色沿用 version3.1 桌面端（蓝白色调）：#1E5FA8 主色 / #EEF4FB 背景
   ========================================================================== */

:root {
  --bg: #EEF4FB;
  --panel: #FFFFFF;
  --primary: #1E5FA8;
  --primary-dark: #123B6B;
  --primary-soft: #E3ECFA;
  --hover: #DCEBFB;
  --border: #CBDCEF;
  --disabled: #B7C6D6;
  --text: #123049;
  --muted: #5B7086;
  --faint: #7D8FA3;
  --danger: #B03A2E;
  --danger-soft: #F7E6E4;
  --success: #1E7A34;
  --success-soft: #E5F3E8;
  --warning: #B0790F;
  --warning-soft: #FBF0DD;
  --accent-m: #7A3FA3;
  --accent-m-soft: #F3E8FB;

  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(18, 48, 73, 0.05), 0 6px 16px rgba(18, 48, 73, 0.06);
  --shadow-pop: 0 8px 28px rgba(18, 48, 73, 0.18);

  --font: "Microsoft YaHei", "PingFang SC", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }
::selection { background: var(--hover); }
a { color: inherit; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--disabled); }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, transform .05s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-soft:hover { background: var(--hover); }
.btn-outline { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--hover); color: var(--primary); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: #f2d4d0; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-icon { padding: 7px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.btn:disabled { background: var(--disabled); color: #fff; cursor: not-allowed; }
.btn-block { width: 100%; justify-content: center; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.field .hint { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.field .hint-warn { color: var(--warning); font-weight: 700; }
.input, .select, .textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}
.input, .select { height: 40px; }
.textarea { resize: vertical; min-height: 84px; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 95, 168, 0.12);
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }

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

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.8;
}
.badge-j { background: var(--primary-soft); color: var(--primary); }
.badge-m { background: var(--accent-m-soft); color: var(--accent-m); }
.badge-yes { background: var(--success-soft); color: var(--success); }
.badge-no { background: var(--danger-soft); color: var(--danger); }
.badge-muted { background: var(--hover); color: var(--muted); }

.avatar-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-dark);
}
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot-simon { background: #1E5FA8; }
.dot-sunny { background: #C08A1E; }
.dot-bella { background: #B0399E; }

.tooltip-wrap { position: relative; }

/* toast */
#toast-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}
.toast {
  background: var(--primary-dark);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-pop);
  animation: toast-in .18s ease;
}
.toast.danger { background: var(--danger); }
.toast.success { background: var(--success); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* modal */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(18, 48, 73, 0.32);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 16px;
}
.modal-mask.open { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-pop);
  animation: modal-in .16s ease;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 16px; }
.modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.modal-head, .modal-foot { flex: none; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 22px; border-top: 1px solid var(--border);
}
.modal-close {
  border: none; background: transparent; color: var(--muted);
  font-size: 18px; cursor: pointer; line-height: 1; padding: 4px;
}
.modal-close:hover { color: var(--danger); }
.field-row { display: flex; gap: 12px; align-items: flex-end; }
.field-row .field { flex: 1; }
.radio-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.radio-pill {
  min-width: 0; white-space: nowrap; text-align: center; padding: 8px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}
.radio-pill.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.radio-pill.active.j { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.radio-pill.active.m { background: var(--accent-m-soft); border-color: var(--accent-m); color: var(--accent-m); }
.radio-pill.active.yes { background: var(--success-soft); border-color: var(--success); color: var(--success); }
.radio-pill.active.no { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

/* ==========================================================================
   登录页
   ========================================================================== */
.login-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 15% 20%, rgba(30,95,168,0.10), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(30,95,168,0.10), transparent 45%),
    var(--bg);
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  padding: 40px 36px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.login-logo {
  width: 64px; height: 64px; border-radius: 18px; overflow: hidden; flex: none;
  box-shadow: 0 8px 20px rgba(30,95,168,0.30);
}
.login-logo img, .sidebar-brand .mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
.login-title { font-size: 19px; font-weight: 800; color: var(--text); line-height: 1.4; }
.login-subtitle { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.login-form { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.login-error {
  width: 100%; background: var(--danger-soft); color: var(--danger);
  border-radius: var(--radius-sm); padding: 9px 12px; font-size: 12.5px; font-weight: 600;
  display: none;
}
.login-error.show { display: block; animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.login-hint { font-size: 11.5px; color: var(--disabled); text-align: center; }
.login-remember { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.login-remember label { display: flex; align-items: center; gap: 6px; cursor: pointer; }

/* ==========================================================================
   主框架：侧边栏 + 顶栏
   ========================================================================== */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 236px;
  flex: none;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
}
/* 机构分组展开多了、或者手机屏幕矮时，菜单自己滚动，底部的改密码 / 退出按钮永远在屏幕里 */
.sidebar nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sidebar-footer { flex: none; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; }
.sidebar-brand .mark {
  width: 36px; height: 36px; border-radius: 10px; overflow: hidden; flex: none;
}
.sidebar-brand .name { font-size: 14.5px; font-weight: 800; color: var(--text); line-height: 1.2; }
.sidebar-brand .sub { font-size: 10.5px; color: var(--muted); }

.nav-item {
  display: flex; align-items: center; gap: 10px; white-space: nowrap; overflow: hidden;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--muted); font-weight: 700; font-size: 13.5px;
  cursor: pointer; margin-bottom: 4px; transition: background .15s, color .15s;
}
.nav-item .ic { font-size: 16px; width: 20px; text-align: center; }
.nav-item:hover { background: var(--hover); color: var(--primary-dark); }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-item .count {
  margin-left: auto; font-size: 11px; background: var(--hover); color: var(--primary-dark);
  padding: 1px 7px; border-radius: 999px; font-weight: 800;
}
.nav-item.active .count { background: rgba(255,255,255,0.25); color: #fff; }

/* 机构分组：箭头放在数字徽章左边，所有徽章仍然靠右对齐成一列 */
.nav-caret { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; color: var(--muted); transition: transform .15s; flex: none; }
.nav-caret + .count { margin-left: 8px; }
.nav-item.active .nav-caret { color: #fff; }
.nav-group.open .nav-caret { transform: rotate(90deg); }
.nav-subgroup { display: none; padding-left: 14px; margin-bottom: 4px; }
.nav-group.open .nav-subgroup { display: block; }
.nav-item.nav-sub { font-size: 12.5px; padding: 8px 12px; }
.nav-item.nav-sub .ic { font-size: 13px; }

.sidebar-footer { margin-top: auto; border-top: 1px solid var(--border); padding-top: 14px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--radius-sm); }
.user-chip .av {
  width: 32px; height: 32px; border-radius: 50%; background: var(--hover); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex: none;
}
.user-chip .info { line-height: 1.3; overflow: hidden; }
.user-chip .info .u-name { font-size: 13px; font-weight: 700; color: var(--text); }
.user-chip .info .u-role { font-size: 11px; color: var(--muted); }
.logout-btn { margin-left: auto; background: none; border: none; color: var(--muted); cursor: pointer; padding: 6px; display: inline-flex; border-radius: 6px; }
.logout-btn:hover { color: var(--danger); }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px; border-bottom: 1px solid var(--border);
  background: rgba(238,244,251,0.97); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 18px; font-weight: 800; }
.topbar-title { flex: 1; min-width: 0; }
/* 手机端打开侧边栏的按钮，宽屏隐藏 */
.sidebar-toggle { display: none; border: 1px solid var(--border); background: #fff; color: var(--primary-dark); border-radius: 8px; width: 36px; height: 36px; align-items: center; justify-content: center; cursor: pointer; flex: none; margin-right: 12px; }
.topbar .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }

.view { display: none; padding: 24px 28px 60px; }
.view.active { display: block; }

/* KPI 卡片 */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi-tile { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi-tile .k-label { font-size: 12px; color: var(--muted); font-weight: 700; }
.kpi-tile .k-value { font-size: 26px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.kpi-tile .k-value .unit { font-size: 13px; color: var(--muted); font-weight: 700; margin-left: 2px; }
.kpi-tile .k-delta { font-size: 11.5px; font-weight: 700; }
.k-delta.up { color: var(--success); }
.k-delta.down { color: var(--danger); }
.k-delta.flat { color: var(--muted); }

/* ==========================================================================
   客资管理 - 日历 + 表格
   ========================================================================== */
.leads-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }

.cal-card { padding: 18px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head .cal-title { font-size: 14.5px; font-weight: 800; }
.cal-nav { display: flex; gap: 4px; }
.cal-nav button {
  border: 1px solid var(--border); background: #fff; border-radius: 7px;
  width: 26px; height: 26px; cursor: pointer; color: var(--muted); font-size: 12px;
}
.cal-nav button:hover { border-color: var(--primary); color: var(--primary); }
/* minmax(0,1fr)：列宽不被格子内容撑开（之前星期六那一列会溢出卡片） */
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-weekdays { margin-bottom: 6px; }
.cal-weekdays span { text-align: center; font-size: 11px; color: var(--muted); font-weight: 700; }
.cal-day {
  position: relative;
  aspect-ratio: 1 / 0.92;
  border-radius: 9px;
  border: 1px solid transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; font-size: 12.5px; color: var(--text); gap: 2px;
  transition: transform .1s ease;
}
.cal-day:hover { border-color: var(--primary); transform: translateY(-1px); }
.cal-day.empty { visibility: hidden; cursor: default; }
.cal-day.out-range { color: var(--disabled); }
/* 今天：格子内圈描边（原来右上角的小圆点在窄格子里会压到日期数字上） */
.cal-day.today { box-shadow: inset 0 0 0 2px var(--primary); }
.cal-day.today .d-num { color: var(--primary); }
.cal-day.today.dark { box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px var(--primary); }
.cal-day.today.dark .d-num { color: #fff; }
.cal-day.today.selected { box-shadow: inset 0 0 0 2px var(--primary), 0 0 0 2px rgba(30,95,168,0.18); }
.cal-day.selected { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(30,95,168,0.18); }
.cal-day .d-num { font-weight: 700; }
.cal-day .d-count {
  font-size: 9.5px; font-weight: 800; color: var(--primary-dark);
  background: rgba(255,255,255,0.65); padding: 0 5px; border-radius: 999px; line-height: 1.5;
}
.cal-legend { display: flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 10.5px; color: var(--muted); }
.cal-legend .sq { width: 12px; height: 12px; border-radius: 3px; }

.cal-daypanel { margin-top: 16px; border-top: 1px dashed var(--border); padding-top: 14px; }
.cal-daypanel .dp-title { font-size: 12.5px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.dp-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 4px 0; }
.dp-row b { color: var(--text); font-weight: 800; }

.table-card { padding: 0; overflow: hidden; }
.table-toolbar {
  display: flex; align-items: center; gap: 10px; padding: 16px 18px; flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}
.table-toolbar .input, .table-toolbar .select { width: auto; min-width: 120px; }
.table-toolbar .search { flex: 1 1 200px; min-width: 180px; }
.spacer { flex: 1; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 800;
  padding: 10px 12px; border-bottom: 1px solid var(--border); background: #FAFCFE;
  position: sticky; top: 0;
}
.data-table td { padding: 11px 12px; border-bottom: 1px solid #EEF3F9; font-size: 13px; }
.data-table th:first-child, .data-table td:first-child { padding-left: 18px; }
.data-table tbody tr:hover { background: #F8FBFE; }
.data-table tbody tr:last-child td { border-bottom: none; }
.wechat-cell { font-weight: 700; }
/* 注意：不能给 td 设 display:flex，会让单元格脱离表格布局、行边框错位 */
.row-actions { white-space: nowrap; opacity: .55; transition: opacity .12s; width: 1%; }
/* 徽章/日期/微信号不折行（之前列宽不够时徽章被挤成一字一行），其余文字允许换行，整表尽量不出横向滚动 */
.data-table th, .data-table td { white-space: nowrap; }
.data-table td.td-wrap { white-space: normal; }
.data-table .sub-note { font-size: 11px; color: var(--muted); white-space: nowrap; }
.table-scroll {
  overflow: auto;
  /* 左右边缘的阴影：还有内容可以横向滑动时才出现 */
  background:
    linear-gradient(to right, #fff 30%, rgba(255,255,255,0)) left center / 32px 100% no-repeat local,
    linear-gradient(to left, #fff 30%, rgba(255,255,255,0)) right center / 32px 100% no-repeat local,
    linear-gradient(to right, rgba(15,40,70,.16), rgba(15,40,70,0)) left center / 14px 100% no-repeat scroll,
    linear-gradient(to left, rgba(15,40,70,.16), rgba(15,40,70,0)) right center / 14px 100% no-repeat scroll;
}
.data-table tr.row-click { cursor: pointer; }
.data-table tr.row-click .wechat-cell { color: var(--primary); }
/* 踢下线：放在账号名下一行（整列对齐），描边样式和状态徽章区分开 */
.data-table .kick-btn { display: flex; margin-top: 4px; padding: 2px 10px; background: transparent; border: 1px solid var(--danger); color: var(--danger); font-size: 12px; }
.data-table .kick-btn:hover { background: var(--danger-soft); }
/* 触屏没有 hover，操作按钮要一直显示 */
@media (hover: none) { .row-actions { opacity: 1; } }
.data-table tbody tr:hover .row-actions { opacity: 1; }
.empty-state { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty-state .ic { font-size: 34px; margin-bottom: 10px; }
.table-pager {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; font-size: 12px; color: var(--muted);
}

/* ==========================================================================
   签约管理 - 看板
   ========================================================================== */
.pipeline-section { margin-bottom: 22px; }
.pipeline-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pipeline-section-head h2 { font-size: 15px; font-weight: 800; }
.pipeline-section-head .tag { font-size: 11px; font-weight: 800; padding: 2px 10px; border-radius: 999px; }
.tag-pending { background: var(--warning-soft); color: var(--warning); }
.tag-signed { background: var(--success-soft); color: var(--success); }
.pipeline-section-head .count-total { color: var(--muted); font-size: 12px; font-weight: 700; }

.view-toggle { display: flex; gap: 3px; background: var(--bg); padding: 3px; border-radius: 999px; border: 1px solid var(--border); flex: none; }
.vt-btn { border: none; background: transparent; padding: 5px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; }
.vt-btn:hover { color: var(--primary-dark); }
.vt-btn.active { background: var(--primary); color: #fff; }

.kanban-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.kanban-col {
  background: #F5F9FD;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  transition: background .12s, border-color .12s;
}
.kanban-col.drag-over { background: var(--hover); border-color: var(--primary); }
.kanban-col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; }
.kanban-col-head .name { font-weight: 800; font-size: 13px; }
.kanban-col-head .n { margin-left: auto; font-size: 11px; color: var(--muted); font-weight: 700; }
.kanban-col-head .add-btn {
  border: none; background: #fff; border: 1px solid var(--border); color: var(--muted);
  width: 22px; height: 22px; border-radius: 6px; cursor: pointer; font-size: 13px; line-height: 1;
}
.kanban-col-head .add-btn:hover { border-color: var(--primary); color: var(--primary); }

.kanban-cards { display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.lead-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; cursor: grab; box-shadow: 0 1px 2px rgba(18,48,73,0.05);
  transition: box-shadow .12s, border-color .12s, opacity .12s;
}
.lead-card:hover { border-color: var(--primary); box-shadow: 0 4px 10px rgba(18,48,73,0.10); }
.lead-card.dragging { opacity: 0.4; }
.lead-card .lc-top { display: flex; align-items: center; justify-content: space-between; }
.lead-card .lc-wechat { font-weight: 800; font-size: 13.5px; }
.lead-card .lc-src-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.lead-card .lc-price { font-weight: 800; font-size: 12.5px; color: var(--success); white-space: nowrap; }
.lead-card .lc-note {
  font-size: 11px; color: var(--muted); margin-top: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.src-badge {
  display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 700;
  padding: 1px 8px; border-radius: 999px; white-space: nowrap;
}
.src-jwl { background: #DEF1F4; color: #0F7A7A; }
.src-gz  { background: #F6E8D7; color: #B0620F; }
.src-sh  { background: #ECEAFB; color: #5B4FA6; }
.src-xinshijie { background: #FFF1E0; color: #B0620F; }
.src-other { background: #EEF1F5; color: #5A6B7D; }

.lead-card .lc-price-options { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.lc-price-chip {
  font-size: 10.5px; font-weight: 800; color: var(--primary-dark); background: var(--primary-soft);
  padding: 1px 8px; border-radius: 999px; white-space: nowrap;
}
.lc-price-chip.muted { background: var(--hover); color: var(--muted); font-weight: 700; }

.chip-input-row { display: flex; gap: 8px; }
.chip-input-row .input { flex: 1; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.price-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
  color: var(--primary-dark); background: var(--primary-soft); padding: 3px 6px 3px 10px; border-radius: 999px;
}
.price-chip button {
  border: none; background: transparent; color: var(--primary-dark); cursor: pointer;
  font-size: 11px; padding: 2px; line-height: 1; opacity: .6; border-radius: 50%;
}
.price-chip button:hover { opacity: 1; color: var(--danger); }
.price-chip-empty { font-size: 12px; color: var(--faint); margin-top: 8px; }

.quickpick-row { display: flex; flex-wrap: wrap; gap: 6px; }
.kanban-more-btn { justify-content: center; border: 1px dashed var(--border); }
.kanban-empty { font-size: 11.5px; color: var(--faint); text-align: center; padding: 16px 4px; border: 1px dashed var(--border); border-radius: var(--radius-sm); }

/* ==========================================================================
   合同管理
   ========================================================================== */
.contracts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.section-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.section-card .sc-head { display: flex; align-items: center; gap: 10px; }
.sc-head .sc-ic {
  width: 34px; height: 34px; border-radius: 10px; background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 16px; flex: none;
}
.sc-head h3 { font-size: 14.5px; font-weight: 800; }
.sc-head .sc-desc { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.sc-badge { white-space: nowrap; flex-shrink: 0; margin-left: auto; font-size: 10.5px; font-weight: 800; color: var(--muted); background: var(--hover); padding: 2px 9px; border-radius: 999px; }

.upload-zone {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.upload-zone .uz-ic { font-size: 26px; margin-bottom: 8px; }
.upload-zone .uz-title { font-size: 13px; font-weight: 700; }
.upload-zone .uz-sub { font-size: 11px; margin-top: 4px; }

.file-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: #FAFCFE;
}
.file-item .f-ic { font-size: 20px; }
.file-item .f-info { flex: 1; min-width: 0; }
.file-item .f-name { font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .f-meta { font-size: 10.5px; color: var(--muted); }
.file-item .f-actions { display: flex; gap: 6px; }

.doc-preview {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; padding: 26px 24px; position: relative; overflow: hidden;
  min-height: 220px;
}
.doc-preview .doc-line { height: 8px; border-radius: 4px; background: #EDF2F8; margin-bottom: 10px; }
.doc-preview .doc-line.w60 { width: 60%; }
.doc-preview .doc-line.w80 { width: 80%; }
.doc-preview .doc-line.w40 { width: 40%; }
.doc-preview .doc-title-line { height: 12px; width: 45%; background: #DCE7F5; margin-bottom: 16px; border-radius: 4px; }

.seal {
  position: absolute; right: 22px; bottom: 18px;
  width: 92px; height: 92px; border-radius: 50%;
  border: 3px solid var(--danger);
  color: var(--danger);
  display: flex; align-items: center; justify-content: center; text-align: center;
  transform: rotate(-14deg) scale(0.85);
  opacity: 0;
  font-weight: 800; font-size: 10.5px; line-height: 1.3;
  box-shadow: inset 0 0 0 2px rgba(176,58,46,0.25);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.seal::before {
  content: "★"; position: absolute; font-size: 15px; color: var(--danger); opacity: .85;
}
.seal .seal-text { position: relative; top: 14px; padding: 0 12px; }
.seal.show { opacity: 0.92; transform: rotate(-14deg) scale(1); }

.ai-output {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #FAFCFE; padding: 16px; font-size: 12.5px; color: var(--text);
  white-space: pre-wrap; line-height: 1.75; max-height: 260px; overflow-y: auto; display: none;
}
.ai-output.show { display: block; }
.ai-loading { display: none; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.ai-loading.show { display: flex; }
.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--primary);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.reserved-note {
  display: block; font-size: 11px; color: var(--muted);
  background: var(--bg); border-radius: var(--radius-sm); padding: 10px 12px;
}

/* ==========================================================================
   来源标签（补充：小红书 / 聚光）
   ========================================================================== */
.src-xhs { background: #FDE7EE; color: #B0295C; }
.src-jz  { background: #E9F3DE; color: #4E7A1E; }
.src-shuhan { background: #E5EEFC; color: #2A5FB0; }

/* ==========================================================================
   提醒条
   ========================================================================== */
.reminder-bar {
  display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center;
  background: var(--warning-soft); border: 1px solid #F0D9A8; border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 16px;
}
.reminder-bar .rb-title { font-size: 12px; font-weight: 800; color: var(--warning); flex: none; }
.rb-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rb-group .rb-name { font-size: 11.5px; font-weight: 800; color: var(--text); margin-right: 2px; }
.reminder-chip {
  background: #fff; color: var(--warning); font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; cursor: pointer; border: 1px solid #F0D9A8;
}
.reminder-chip:hover { background: var(--warning); color: #fff; }
.reminder-item { display: inline-flex; align-items: center; gap: 3px; }
.reminder-copy-btn {
  border: 1px solid #F0D9A8; background: #fff; color: var(--warning);
  width: 22px; height: 22px; border-radius: 999px; cursor: pointer; font-size: 11px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.reminder-copy-btn:hover { background: var(--warning); color: #fff; }
.reminder-copy-btn.copied { background: var(--success); border-color: var(--success); color: #fff; }
/* 跟进关键节点（1/2/3/5/7/14/30 天）高亮 */
.reminder-item.key-day .reminder-chip { background: var(--warning); color: #fff; border-color: var(--warning); }
.reminder-more-btn { border: 1px dashed var(--border); background: #fff; color: var(--muted); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; cursor: pointer; }
.reminder-more-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ==========================================================================
   月份切换器
   ========================================================================== */
.month-switch {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 8px 5px 14px; font-weight: 800; font-size: 13px; color: var(--primary-dark);
}
.month-switch button {
  border: none; background: var(--hover); color: var(--muted);
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: 12px;
}
.month-switch button:hover { background: var(--primary-soft); color: var(--primary); }

/* ==========================================================================
   通用筛选 Tab（不等宽版 radio-pill，用于人员/员工筛选）
   ========================================================================== */
.chip-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-tab {
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.chip-tab:hover { border-color: var(--primary); color: var(--primary); }
.chip-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* 看板追加一列：新增销售 */
.kanban-add-col {
  align-self: start;
  border: 1.5px dashed var(--border); border-radius: var(--radius-lg);
  min-height: 140px; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-weight: 800; font-size: 13px; cursor: pointer; gap: 6px;
}
.kanban-add-col:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }


.field-note { font-size: 11px; color: var(--muted); margin-top: -8px; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1100px) {
  .sidebar { position: fixed; z-index: 100; transform: translateX(-100%); visibility: hidden; transition: transform .2s, visibility .2s; box-shadow: none; }
  .sidebar.open { transform: translateX(0); visibility: visible; box-shadow: var(--shadow-pop); }
  .sidebar-toggle { display: inline-flex; }
}
@media (max-width: 860px) {
  .leads-layout { grid-template-columns: 1fr; }
  /* 单栏时日历别铺满整屏，格子也别太大，把下面的表格挤出第一屏 */
  .leads-layout > .cal-card { max-width: 460px; width: 100%; }
  .cal-day { aspect-ratio: auto; height: 44px; }
}
@media (max-width: 1180px) {
  .contracts-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .pipeline-section-head { flex-wrap: wrap; }
  .table-toolbar .select { min-width: 0; flex: 0 1 auto; }
  .table-toolbar .search { min-width: 0; flex: 1 1 220px; }
  .kanban-row { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .topbar { padding: 14px 16px; }
  .view { padding: 16px; }
}

/* ==========================================================================
   接入后端后新增：加载中 / 请求中 / 改密码 / 账号管理
   ========================================================================== */
.boot-loading { display: none; }
body.booting .boot-loading {
  display: flex; position: fixed; inset: 0; z-index: 900; background: var(--bg);
  align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-weight: 700; font-size: 13px;
}
body.is-busy, body.is-busy * { cursor: progress !important; }
.btn:disabled { opacity: .6; }
.user-chip .logout-btn + .logout-btn { margin-left: 0; }
.modal-mask.locked { background: rgba(18, 48, 73, 0.55); }
.acct-result { background: var(--success-soft); color: var(--text); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12.5px; line-height: 1.8; }
.acct-result .pw-code { font-family: Consolas, Menlo, monospace; font-size: 15px; font-weight: 800; background: #fff; padding: 1px 8px; border-radius: 6px; user-select: all; }
.acct-table-wrap { overflow: auto; max-height: 300px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.acct-table-wrap .data-table td { padding: 8px 10px; }
.acct-table-wrap .data-table th { padding: 8px 10px; }
.acct-form { border-top: 1px dashed var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.acct-form-title { font-size: 13px; font-weight: 800; }
.data-table tr.row-disabled td { color: var(--disabled); }
.site-footer { font-size: 12px; color: var(--muted); text-align: center; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--primary); }
.login-hint { color: var(--muted); }

/* 账号与权限 */
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); cursor: pointer; white-space: nowrap; }
.check-inline.disabled { color: var(--disabled); cursor: not-allowed; }
.acct-checks { display: flex; gap: 18px; flex-wrap: wrap; }
.perm-grid { border: 1px solid var(--border); border-radius: var(--radius-sm); }
.perm-row { display: flex; gap: 12px; padding: 8px 12px; border-bottom: 1px solid #EEF3F9; align-items: flex-start; }
.perm-row:last-child { border-bottom: none; }
.perm-mod { width: 128px; flex: none; font-size: 12.5px; font-weight: 800; color: var(--text); padding-top: 1px; }
.perm-opts { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.perm-chip { display: inline-flex; gap: 4px; align-items: center; font-size: 11.5px; background: var(--hover); color: var(--primary-dark); padding: 1px 8px; border-radius: 999px; margin: 1px 0; white-space: nowrap; }
.perm-chip b { font-weight: 800; color: var(--primary); }
.tpl-link { color: var(--primary); font-weight: 700; text-decoration: none; font-size: 12px; }
.tpl-link:hover { text-decoration: underline; }
.input:disabled, .select:disabled { background: #F3F6FA; color: var(--muted); }
@media (max-width: 860px) { .perm-row { flex-direction: column; gap: 4px; } .perm-mod { width: auto; } }

/* 网络较慢时（请求超过半秒）：顶部进度条 + 提示，让人知道系统在处理而不是卡死 */
body.is-slow::before {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1000;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  background-size: 40% 100%; background-repeat: no-repeat;
  animation: slowbar 1.1s linear infinite;
}
body.is-slow::after {
  content: "网络较慢，正在处理…"; position: fixed; top: 10px; right: 16px; z-index: 1000;
  background: var(--primary-dark); color: #fff; font-size: 12px; font-weight: 700;
  padding: 5px 12px; border-radius: 999px; box-shadow: var(--shadow-pop);
}
@keyframes slowbar { from { background-position: -40% 0; } to { background-position: 140% 0; } }

.team-tabs-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px; }
@media (max-width: 480px) {
  .field-row { flex-direction: column; align-items: stretch; }
  .modal-mask { padding: 10px; }
  .modal-body { padding: 16px; }
  .modal-head, .modal-foot { padding: 14px 16px; }
}

@media (min-width: 861px) and (max-width: 1440px) {
  .leads-layout { grid-template-columns: 260px minmax(0, 1fr); }
  .cal-card { padding: 14px; }
  .data-table th, .data-table td { padding-left: 9px; padding-right: 9px; }
  .data-table th:first-child, .data-table td:first-child { padding-left: 14px; }
}
/* 768 左右：日历旁边空出来的地方放"客资概览"；4 张统计卡一行排开 */
@media (min-width: 600px) and (max-width: 860px) {
  .leads-layout > .cal-card { max-width: none; display: grid; grid-template-columns: minmax(0, 340px) 1fr; column-gap: 24px; }
  .leads-layout > .cal-card > * { grid-column: 1; }
  .leads-layout > .cal-card > .cal-daypanel { grid-column: 2; grid-row: 1 / span 4; margin-top: 0; padding-top: 0; border-top: none; border-left: 1px dashed var(--border); padding-left: 20px; }
  .kpi-row { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .kpi-tile { padding: 12px; }
  .kpi-tile .k-value { font-size: 22px; }
}

/* 工具栏里的主按钮：换行后也靠右 */
.table-toolbar .btn-primary { margin-left: auto; }
/* 登录记录的 24 小时安全概况 */
.security-summary { flex-basis: 100%; order: 10; font-size: 12px; color: var(--muted); }
.security-summary.warn { color: var(--danger); font-weight: 700; }

/* ==========================================================================
   数据统计表
   ========================================================================== */
.stats-table th.num, .stats-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.stats-table td.rate { font-weight: 700; color: var(--primary, #1E5FA8); }
.stats-table tr.stats-total td { font-weight: 800; background: rgba(30, 95, 168, 0.06); border-top: 1px solid var(--border); }

/* ==========================================================================
   上下班打卡 / 新媒体日报
   ========================================================================== */
/* 顶栏一键打卡：没打的是橙色，打过的是绿色 */
.clock-bar { display: flex; gap: 8px; }
.clock-btn { border: 1px solid var(--border); background: var(--panel); color: var(--text); border-radius: 999px;
  padding: 7px 14px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.clock-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.clock-btn.todo { background: #FFF4E5; border-color: #F2C27A; color: #8A5A0A; }
.clock-btn.todo:hover:not(:disabled) { background: #FFEBCC; border-color: #E5A94D; color: #8A5A0A; }
.clock-btn.done { background: #EEF7F0; border-color: #CBE5D1; color: var(--success, #1E7A34); }
.clock-btn:disabled { cursor: default; }
.clock-btn:disabled:not(.done) { color: var(--muted); }
/* 手机上两个按钮单独一行、铺满，好按 */
@media (max-width: 600px) {
  .topbar.with-clock { flex-wrap: wrap; }
  .topbar.with-clock .topbar-actions { order: 3; width: 100%; margin-top: 10px; }
  .topbar.with-clock .clock-bar { width: 100%; }
  .topbar.with-clock .clock-btn { flex: 1; padding: 10px 8px; font-size: 13.5px; }
}
.clock-card { padding: 18px 20px; }
.clock-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.clock-date { font-size: 17px; font-weight: 800; }
.clock-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.clock-btns { display: flex; gap: 10px; }
.clock-btns .btn { min-width: 112px; min-height: 42px; font-size: 14px; }
.clock-status { display: flex; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.clock-cell { flex: 1 1 200px; background: var(--primary-soft); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.clock-cell span { font-size: 12px; color: var(--muted); }
.clock-cell b { font-size: 22px; font-variant-numeric: tabular-nums; }
.clock-cell em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.media-table input.input { width: 92px; text-align: right; padding: 6px 8px; }
.media-table input.note-input { width: 150px; text-align: left; }
.media-table tr.mine td { background: rgba(30, 95, 168, 0.05); }
.att-bad { color: var(--danger, #B03A2E); font-weight: 700; }
.att-ok { color: var(--success, #1E7A34); font-weight: 700; }
@media (max-width: 860px) { .clock-btns { width: 100%; } .clock-btns .btn { flex: 1; } }

/* ==========================================================================
   登录拖拽拼图
   ========================================================================== */
.captcha-box { margin-top: 14px; width: 100%; max-width: 300px; margin-left: auto; margin-right: auto; }
.captcha-box[hidden] { display: none; }
.captcha-title { font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; }
.captcha-refresh { border: none; background: none; color: var(--primary); font-size: 12px; cursor: pointer; padding: 0; }
.captcha-stage { position: relative; width: 100%; aspect-ratio: 2 / 1; border-radius: 8px; overflow: hidden; background: var(--primary-soft); user-select: none; }
#captcha-bg { width: 100%; height: 100%; }
.captcha-stage img { position: absolute; top: 0; left: 0; pointer-events: none; -webkit-user-drag: none; }
#captcha-piece { filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.captcha-track { position: relative; width: 100%; height: 40px; margin-top: 10px; border-radius: 999px; background: #EEF2F7; border: 1px solid var(--border); touch-action: none; user-select: none; }
.captcha-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 20px; border-radius: 999px; background: var(--primary-soft); }
.captcha-tip { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12.5px; color: var(--muted); pointer-events: none; }
.captcha-handle { position: absolute; top: -1px; left: 0; width: 53px; height: 40px; border-radius: 999px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; cursor: grab; touch-action: none; box-shadow: 0 2px 6px rgba(30,95,168,.35); }
.captcha-handle:active { cursor: grabbing; }
.captcha-msg { min-height: 18px; margin-top: 6px; font-size: 12px; color: var(--danger); text-align: center; }

/* ==========================================================================
   新媒体月表（照原来的腾讯文档：竖着每天，横着每人三列）
   ========================================================================== */
.sheet-scroll { overflow: auto; max-height: calc(100vh - 260px); min-height: 320px; border-top: 1px solid var(--border); }
.media-sheet { border-collapse: separate; border-spacing: 0; font-size: 12.5px; width: max-content; }
.media-sheet th, .media-sheet td { border-bottom: 1px solid var(--border); border-right: 1px solid #E8EEF5; padding: 0; height: 32px; white-space: nowrap; background: var(--panel); }
.media-sheet thead th { position: sticky; z-index: 2; background: #F4F7FB; font-weight: 700; color: var(--muted); padding: 0 8px; }
.media-sheet thead tr:first-child th { top: 0; height: 34px; color: var(--text); }
.media-sheet thead tr:nth-child(2) th { top: 34px; font-size: 11.5px; }
.media-sheet .sheet-date { position: sticky; left: 0; z-index: 1; text-align: left; padding: 0 10px; min-width: 108px; font-weight: 700; border-right: 1px solid var(--border); }
.media-sheet thead .sheet-date { z-index: 3; }
.media-sheet .sheet-wk { color: var(--muted); font-weight: 400; font-size: 11px; }
.media-sheet .num { text-align: right; width: 78px; min-width: 78px; max-width: 78px; padding: 0 8px; font-variant-numeric: tabular-nums; }
.media-sheet .grp { border-left: 1px solid #C9D5E3; }
.media-sheet .sheet-person { text-align: center; border-left: 1px solid #C9D5E3; }
.media-sheet .sheet-region { font-weight: 400; color: var(--primary); font-size: 11.5px; margin-left: 4px; }
.media-sheet .sheet-sum { background: #F7FAF7; color: var(--success, #1E7A34); font-weight: 700; }
.media-sheet thead .sheet-sum { background: #EEF6EF; }
.media-sheet td.sheet-edit { padding: 0; background: #FFFFFF; }
.media-sheet .sheet-input { width: 100%; height: 31px; border: none; background: transparent; text-align: right; padding: 0 8px; font: inherit; font-variant-numeric: tabular-nums; color: var(--text); }
.media-sheet .sheet-input:hover { background: var(--primary-soft); }
.media-sheet .sheet-input:focus { outline: 2px solid var(--primary); outline-offset: -2px; background: #fff; }
.media-sheet .sheet-input.saving { color: var(--muted); }
.media-sheet .sheet-input.saved { background: #E5F3E8; }
.media-sheet .sheet-input.bad { outline: 2px solid var(--danger); outline-offset: -2px; }
.media-sheet tr.sheet-today td { background: #FFF8E6; }
.media-sheet tr.sheet-today td.sheet-edit { background: #FFFBEF; }
.media-sheet tr.sheet-today .sheet-date { color: #8A5A0A; }
.media-sheet tr.sheet-future td { color: #6E8094; background: #FBFCFE; }
.media-sheet tr.sheet-weekend .sheet-date { color: var(--muted); }
.media-sheet tfoot td { position: sticky; z-index: 1; background: #F4F7FB; font-weight: 800; }
.media-sheet tfoot tr.stats-total td { bottom: 0; }
.media-sheet tfoot .sheet-date { z-index: 2; }

/* 新媒体「按天填写」在手机上：自己那一行在上面的大卡片里填，下面的表只看数字 */
.media-table .mval { display: none; }
.media-my { padding: 4px 16px 14px; }
.media-my-title { font-weight: 800; font-size: 13.5px; margin-bottom: 8px; }
.media-my-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.media-my-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.media-my-grid .input { font-size: 18px; padding: 10px 8px; text-align: center; }
@media (max-width: 860px) {
  .media-my.has-mine { display: block !important; }
  .media-table .input, .media-table [data-media-save] { display: none; }
  .media-table .mval { display: inline; }
  .media-table .col-note, .media-table .col-upd, .media-table .col-act { display: none; }
}
