/* =============================================================
   任务安排工作台 · 设计系统
   还原原型：红色顶栏 + 深色侧边栏 + 浅色卡片仪表盘
   ============================================================= */

:root {
  /* 品牌色 */
  --brand-900: #8F0E25;
  --brand-800: #A8122C;
  --brand-700: #C8102E;
  --brand-600: #DA2547;
  --brand-500: #E64A6A;
  --brand-100: #FDE8EC;

  /* 中性色 */
  --ink-900: #16161A;
  --ink-800: #1E1E24;
  --ink-700: #2A2A33;
  --ink-600: #4B5563;
  --ink-500: #6B7280;
  --ink-400: #9CA3AF;
  --ink-300: #D1D5DB;
  --ink-200: #E7E9EE;
  --ink-100: #F1F2F5;
  --ink-50:  #F7F8FA;

  /* 语义色 */
  --red: #D92D20;      --red-bg: #FDECEC;
  --orange: #E8590C;   --orange-bg: #FFF3E6;
  --amber: #D97706;    --amber-bg: #FEF3C7;
  --blue: #1A73E8;     --blue-bg: #E8F0FE;
  --green: #12805C;    --green-bg: #E6F6EF;
  --purple: #7C3AED;   --purple-bg: #F1EAFE;
  --teal: #0891B2;     --teal-bg: #E0F5FA;
  --pink: #DB2777;     --pink-bg: #FDEAF3;
  --gray: #6B7280;     --gray-bg: #F1F2F5;

  --radius: 14px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 12px rgba(16, 24, 40, .05);
  --shadow-pop: 0 8px 28px rgba(16, 24, 40, .16);
  --sidebar-w: 172px;
  --sidebar-w-mini: 68px;
  --topbar-h: 66px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--ink-100);
  color: var(--ink-900);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #CFD3DB; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #B4BAC6; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================ 布局 ============================ */
.app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.app-body { flex: 1; display: flex; min-height: 0; }

/* ============================ 顶栏 ============================ */
.topbar {
  height: var(--topbar-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 18px 0 16px;
  color: #fff;
  background:
    linear-gradient(104deg, rgba(255,255,255,.16) 0 18%, rgba(255,255,255,0) 46%),
    linear-gradient(96deg, #A8122C 0%, #C8102E 46%, #E0446A 100%);
  position: relative;
  z-index: 30;
}
.topbar::after {
  content: "";
  position: absolute; right: 0; top: 0; bottom: 0; width: 240px;
  background: linear-gradient(115deg, rgba(255,255,255,0) 40%, rgba(255,255,255,.18) 100%);
  pointer-events: none;
}

.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  flex-shrink: 0;
}
.brand-logo svg { width: 22px; height: 22px; }
.brand-text { min-width: 0; }
.brand-title { font-size: 19px; font-weight: 800; letter-spacing: .5px; line-height: 1.15; white-space: nowrap; }
.brand-sub { font-size: 11px; opacity: .88; white-space: nowrap; margin-top: 1px; }

.topbar-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}
.topbar-search input {
  width: 100%; height: 38px; border: none; outline: none;
  border-radius: var(--radius-pill);
  background: #fff;
  padding: 0 16px 0 40px;
  font-size: 13px; color: var(--ink-900);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
}
.topbar-search input::placeholder { color: #9AA1AC; }
.topbar-search .search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: #6B7280;
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.bell {
  position: relative; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.14); border: none; color: #fff;
}
.bell:hover { background: rgba(255,255,255,.24); }
.bell svg { width: 18px; height: 18px; }
.bell-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: #fff; color: var(--brand-700);
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}

.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 10px 3px 4px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,.14); border: none; color: #fff;
}
.user-chip:hover { background: rgba(255,255,255,.24); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: #fff; color: var(--brand-700);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
  background-size: cover; background-position: center;
}
.user-name { font-size: 13px; font-weight: 600; }
.user-chip .caret { width: 12px; height: 12px; opacity: .9; }

.pager-badge {
  display: flex; align-items: center; justify-content: center;
  min-width: 46px; height: 32px; padding: 0 10px;
  border-radius: 10px; background: rgba(255,255,255,.95);
  color: var(--brand-700); font-weight: 700; font-size: 13px;
}

/* ============================ 侧边栏 ============================ */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(180deg, #1E1E24 0%, #16161A 100%);
  padding: 12px 10px;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  transition: width .18s ease;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: #3A3A44; }

.nav-item {
  display: flex; align-items: center; gap: 11px;
  height: 42px; padding: 0 12px; margin-bottom: 3px;
  border-radius: 10px;
  color: #B9BCC6; font-size: 13.5px; font-weight: 500;
  white-space: nowrap; position: relative;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active {
  background: linear-gradient(96deg, #C8102E 0%, #DE2F50 100%);
  color: #fff; font-weight: 600;
  box-shadow: 0 4px 12px rgba(200,16,46,.35);
}
.nav-icon { width: 19px; height: 19px; flex-shrink: 0; }
.nav-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.nav-badge {
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; background: rgba(255,255,255,.16);
  color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.nav-item.active .nav-badge { background: #fff; color: var(--brand-700); }

.sidebar-toggle {
  position: absolute; right: -11px; top: 50%; margin-top: -22px;
  width: 22px; height: 44px; border: none;
  border-radius: 0 10px 10px 0;
  background: #2A2A33; color: #9CA3AF;
  display: flex; align-items: center; justify-content: center;
  z-index: 20; box-shadow: 2px 0 8px rgba(0,0,0,.2);
}
.sidebar-toggle:hover { color: #fff; }
.sidebar-toggle svg { width: 12px; height: 12px; }

/* 折叠态 */
.app.mini .sidebar { width: var(--sidebar-w-mini); }
.app.mini .nav-label, .app.mini .nav-badge { display: none; }
.app.mini .nav-item { justify-content: center; padding: 0; }
.app.mini .sidebar-toggle svg { transform: rotate(180deg); }
.app.mini .minimal-hide { display: none !important; }

/* ============================ 主内容 ============================ */
.main {
  flex: 1; min-width: 0;
  overflow-y: auto;
  background: var(--ink-100);
  padding: 16px;
}

.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.page-title { font-size: 19px; font-weight: 800; letter-spacing: .2px; }
.page-desc { font-size: 12.5px; color: var(--ink-500); }
.page-head .spacer { flex: 1; }

/* ============================ 卡片 ============================ */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid #EFF1F5;
  display: flex; flex-direction: column;
  min-width: 0;
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 10px;
}
.card-title { font-size: 15.5px; font-weight: 800; letter-spacing: .2px; }
.card-sub { font-size: 12px; color: var(--ink-500); }
.card-head .spacer { flex: 1; }
.card-body { padding: 0 16px 14px; }
.card-body.tight { padding: 0 0 6px; }

/* ============================ 指标卡 ============================ */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.metric {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-card); border: 1px solid #EFF1F5;
  padding: 15px 16px;
  display: flex; align-items: flex-start; gap: 12px;
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform .16s, box-shadow .16s;
}
.metric:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,24,40,.1); }
.metric-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.metric-icon svg { width: 21px; height: 21px; }
.metric-main { flex: 1; min-width: 0; }
.metric-label { font-size: 13.5px; font-weight: 700; color: var(--ink-800); }
.metric-value { font-size: 30px; font-weight: 800; line-height: 1.15; letter-spacing: -.5px; }
.metric-foot { font-size: 12px; color: var(--ink-500); margin-top: 2px; }
.metric-foot b { font-weight: 700; }
.metric-spark {
  position: absolute; right: 10px; bottom: 8px;
  display: flex; align-items: flex-end; gap: 3px; height: 30px; opacity: .85;
}
.metric-spark i { width: 5px; border-radius: 2px; display: block; }

.tone-blue   { background: var(--blue-bg);   color: var(--blue); }
.tone-orange { background: var(--orange-bg); color: var(--orange); }
.tone-amber  { background: var(--amber-bg);  color: var(--amber); }
.tone-purple { background: var(--purple-bg); color: var(--purple); }
.tone-red    { background: var(--red-bg);    color: var(--red); }
.tone-green  { background: var(--green-bg);  color: var(--green); }
.tone-gray   { background: var(--gray-bg);   color: var(--gray); }
.tone-teal   { background: var(--teal-bg);   color: var(--teal); }
.tone-pink   { background: var(--pink-bg);   color: var(--pink); }

/* ============================ 栅格行 ============================ */
.grid-row { display: grid; gap: 14px; margin-bottom: 14px; align-items: start; }
.grid-row.tasks-schedule { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); }
.grid-row.focus-waiting  { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
.grid-row.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-row.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ============================ 按钮 ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 14px;
  border-radius: 9px; border: 1px solid transparent;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  background: #fff; color: var(--ink-700);
  transition: background .15s, border-color .15s, color .15s;
}
.btn svg { width: 14px; height: 14px; }
.btn-primary {
  background: linear-gradient(96deg, #C8102E 0%, #DE2F50 100%);
  color: #fff; box-shadow: 0 3px 10px rgba(200,16,46,.28);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: #fff; border-color: var(--ink-200); color: var(--ink-600); }
.btn-ghost:hover { border-color: var(--brand-500); color: var(--brand-700); }
.btn-plain { background: transparent; color: var(--brand-700); padding: 0 4px; height: 24px; font-weight: 600; }
.btn-plain:hover { color: var(--brand-600); }
.btn-sm { height: 27px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-bg); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ============================ 页签 ============================ */
.tabs { display: flex; align-items: center; gap: 6px; }
.tab {
  height: 28px; padding: 0 12px; border-radius: 8px;
  border: none; background: transparent; color: var(--ink-500);
  font-size: 12.5px; font-weight: 600;
}
.tab:hover { background: var(--ink-100); color: var(--ink-800); }
.tab.active { background: var(--brand-700); color: #fff; }
.tab .num { opacity: .85; margin-left: 2px; }

/* ============================ 表格 ============================ */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-500);
  padding: 9px 10px; background: #FAFBFC; white-space: nowrap;
}
.table th:first-child { border-radius: 8px 0 0 8px; }
.table th:last-child { border-radius: 0 8px 8px 0; }
.table td {
  padding: 10px; border-bottom: 1px solid #F3F4F7;
  font-size: 13px; color: var(--ink-800); vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #FCFCFD; }
.table .col-check { width: 34px; }
.table .col-op { width: 56px; text-align: center; }
.table .num { font-variant-numeric: tabular-nums; }

.task-title { font-weight: 600; color: var(--ink-900); cursor: pointer; }
.task-title:hover { color: var(--brand-700); }
.task-title.done { color: var(--ink-400); text-decoration: line-through; font-weight: 500; }
.task-meta { font-size: 11.5px; color: var(--ink-400); margin-top: 2px; }

/* 复选框 */
.checkbox {
  width: 16px; height: 16px; border-radius: 5px;
  border: 1.5px solid var(--ink-300); background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: all .15s;
}
.checkbox:hover { border-color: var(--brand-500); }
.checkbox.checked { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.checkbox svg { width: 10px; height: 10px; }

/* ============================ 徽标 / 药丸 ============================ */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 9px; border-radius: var(--radius-pill);
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.pill-red     { background: var(--red-bg); color: var(--red); }
.pill-orange  { background: var(--orange-bg); color: var(--orange); }
.pill-amber   { background: var(--amber-bg); color: #B45309; }
.pill-blue    { background: var(--blue-bg); color: var(--blue); }
.pill-green   { background: var(--green-bg); color: var(--green); }
.pill-purple  { background: var(--purple-bg); color: var(--purple); }
.pill-teal    { background: var(--teal-bg); color: var(--teal); }
.pill-pink    { background: var(--pink-bg); color: var(--pink); }
.pill-gray    { background: var(--gray-bg); color: var(--gray); }

.pill.clickable { cursor: pointer; }
.pill.clickable:hover { filter: brightness(.96); }

.tag-chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 8px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 600;
}
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.muted { color: var(--ink-400); }
.fw-600 { font-weight: 600; }
.text-red { color: var(--red); }
.nowrap { white-space: nowrap; }

/* ============================ 时间轴 ============================ */
.timeline { padding: 2px 0 4px; }
.tl-row { display: flex; gap: 8px; }
.tl-period {
  flex: 0 0 34px; width: 34px;
  font-size: 11.5px; font-weight: 600; color: var(--ink-500);
  text-align: right; padding-top: 13px;
}
.tl-track {
  flex: 1; min-width: 0; position: relative;
  margin-left: 5px; padding: 10px 0 10px 18px;
  border-left: 1.5px solid #EDEFF3;
}
.tl-dot {
  position: absolute; left: -5px; top: 15px;
  width: 9px; height: 9px; border-radius: 50%;
  box-shadow: 0 0 0 3px #fff; z-index: 1;
}
.tl-body { display: flex; align-items: center; gap: 8px; }
.tl-main { flex: 1; min-width: 0; }
.tl-title { font-size: 13px; font-weight: 600; color: var(--ink-900); }
.tl-sub { font-size: 11.5px; color: var(--ink-500); margin-top: 1px; }
.tl-time { font-size: 11px; color: var(--ink-400); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-arrow { color: var(--ink-300); width: 14px; height: 14px; flex-shrink: 0; }

.scroll-mask { position: relative; }
.scroll-mask .mask {
  position: absolute; left: 0; right: 0; bottom: 0; height: 34px;
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff);
  pointer-events: none; border-radius: 0 0 var(--radius) var(--radius);
}

/* ============================ 本周重点 ============================ */
.focus-list { padding: 2px 0; }
.focus-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 6px; border-radius: 9px; cursor: default;
}
.focus-item:hover { background: #FAFBFC; }
.focus-seq {
  width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 700;
}
.focus-title { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus-item.done .focus-title { color: var(--ink-400); text-decoration: line-through; font-weight: 500; }
.focus-drag { color: var(--ink-300); cursor: grab; width: 13px; height: 13px; opacity: 0; }
.focus-item:hover .focus-drag { opacity: 1; }
.focus-item.dragging { opacity: .45; }
.focus-item.drop-target { box-shadow: inset 0 0 0 2px var(--brand-500); }

/* ============================ 等待回复 ============================ */
.waiting-list .table td { padding: 9px 8px; }
.days-badge { font-weight: 700; font-variant-numeric: tabular-nums; }
.days-badge.overtime { color: var(--red); }
.days-badge.normal { color: var(--orange); }

.badge-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--brand-700); color: #fff; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ============================ 文件图标 ============================ */
.file-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.file-icon {
  width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.file-icon svg { width: 14px; height: 14px; }
.file-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================ 空态 ============================ */
.empty {
  padding: 30px 10px; text-align: center; color: var(--ink-400); font-size: 12.5px;
}
.empty svg { width: 40px; height: 40px; opacity: .35; margin-bottom: 8px; }

/* ============================ 弹层 ============================ */
.popover {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 340px; max-height: 420px; overflow-y: auto;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow-pop);
  border: 1px solid #EDEFF3; z-index: 200; display: none;
}
.popover.show { display: block; }
.popover-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid #F3F4F7;
  position: sticky; top: 0; background: #fff; z-index: 1;
}
.popover-head .title { font-weight: 700; font-size: 13.5px; }
.popover-head .spacer { flex: 1; }
.notice-item { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid #F6F7F9; }
.notice-item:last-child { border-bottom: none; }
.notice-item.unread { background: #FFFBFB; }
.notice-body { flex: 1; min-width: 0; }
.notice-title { font-size: 12.5px; font-weight: 600; }
.notice-text { font-size: 11.5px; color: var(--ink-500); margin-top: 2px; line-height: 1.5; }
.notice-time { font-size: 11px; color: var(--ink-400); white-space: nowrap; }

.user-menu { width: 180px; }
.user-menu a {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; font-size: 13px; color: var(--ink-700);
}
.user-menu a:hover { background: var(--ink-50); color: var(--brand-700); }
.user-menu a svg { width: 15px; height: 15px; }
.user-menu .divider { height: 1px; background: #F1F2F5; margin: 4px 0; }

.search-pop { width: 420px; left: 0; right: auto; }
.search-group-title { font-size: 11px; font-weight: 700; color: var(--ink-400); padding: 9px 14px 4px; }
.search-row { display: flex; align-items: center; gap: 8px; padding: 8px 14px; cursor: pointer; }
.search-row:hover { background: var(--ink-50); }
.search-row .t { font-size: 12.5px; font-weight: 600; }
.search-row .s { font-size: 11px; color: var(--ink-400); }

/* ============================ 弹窗 ============================ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(17,20,28,.45);
  display: none; align-items: center; justify-content: center;
  z-index: 500; padding: 20px; backdrop-filter: blur(2px);
}
.modal-mask.show { display: flex; }
.modal {
  width: 520px; max-width: 100%; max-height: 88vh; overflow-y: auto;
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-pop);
  animation: modalIn .18s ease;
}
.modal.wide { width: 720px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px 12px;
}
.modal-title { font-size: 15.5px; font-weight: 800; }
.modal-head .spacer { flex: 1; }
.modal-close {
  width: 28px; height: 28px; border-radius: 8px; border: none;
  background: var(--ink-100); color: var(--ink-500);
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--ink-200); color: var(--ink-800); }
.modal-body { padding: 0 20px 6px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px 18px;
}

/* ============================ 表单 ============================ */
.form-row { margin-bottom: 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid.cols-1 { grid-template-columns: 1fr; }
.form-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-600); margin-bottom: 6px; }
.form-label .req { color: var(--red); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 11px;
  border: 1px solid var(--ink-200); border-radius: 9px;
  font-size: 13px; color: var(--ink-900); background: #fff;
  outline: none; transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.textarea { height: auto; min-height: 76px; padding: 9px 11px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(200,16,46,.1);
}
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5L6 8.5L10 4.5' stroke='%236B7280' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 12px; padding-right: 28px; }
.input-sm { height: 32px; font-size: 12.5px; }

.chip-select { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  height: 28px; padding: 0 11px; border-radius: var(--radius-pill);
  border: 1px solid var(--ink-200); background: #fff;
  font-size: 12px; font-weight: 600; color: var(--ink-600);
  display: inline-flex; align-items: center; gap: 5px;
}
.chip:hover { border-color: var(--ink-300); }
.chip.on { border-color: transparent; color: #fff; }

/* ============================ 提示条 ============================ */
.toast-wrap {
  position: fixed; top: 22px; left: 50%; transform: translateX(-50%);
  z-index: 900; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  min-width: 160px; max-width: 420px;
  padding: 10px 16px; border-radius: 11px;
  background: #fff; box-shadow: var(--shadow-pop);
  border-left: 3px solid var(--brand-700);
  font-size: 13px; font-weight: 600; color: var(--ink-800);
  display: flex; align-items: center; gap: 8px;
  animation: toastIn .2s ease;
}
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
.toast svg { width: 15px; height: 15px; flex-shrink: 0; }
.toast.ok svg { color: var(--green); }
.toast.err svg { color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ============================ 登录页 ============================ */
.login-page {
  min-height: 100vh; display: flex;
  background: linear-gradient(115deg, #8F0E25 0%, #C8102E 42%, #E0446A 100%);
  position: relative; overflow: hidden;
}
.login-page::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(680px 420px at 12% 18%, rgba(255,255,255,.16), transparent 62%),
    radial-gradient(560px 380px at 88% 82%, rgba(255,255,255,.12), transparent 60%);
}
.login-art {
  flex: 1; color: #fff; padding: 64px 56px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; z-index: 1;
}
.login-art .logo-row { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.login-art .logo-box {
  width: 48px; height: 48px; border-radius: 14px; background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.login-art h1 { font-size: 34px; margin: 0 0 10px; letter-spacing: 1px; }
.login-art p { font-size: 14px; opacity: .9; margin: 0 0 30px; line-height: 1.8; }
.login-feats { display: flex; flex-direction: column; gap: 13px; }
.login-feat { display: flex; align-items: center; gap: 10px; font-size: 13.5px; opacity: .95; }
.login-feat i {
  width: 26px; height: 26px; border-radius: 8px; background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.login-feat svg { width: 14px; height: 14px; }

.login-panel {
  width: 420px; flex-shrink: 0; background: #fff;
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px 44px; position: relative; z-index: 1;
  box-shadow: -16px 0 48px rgba(0,0,0,.14);
}
.login-panel h2 { font-size: 23px; margin: 0 0 6px; }
.login-panel .hint { font-size: 12.5px; color: var(--ink-500); margin-bottom: 26px; }
.login-panel .input { height: 42px; }
.login-panel .btn-primary { height: 42px; width: 100%; font-size: 14px; margin-top: 6px; }
.login-tip {
  margin-top: 18px; padding: 10px 12px; border-radius: 10px;
  background: var(--brand-100); color: var(--brand-800);
  font-size: 12px; line-height: 1.7;
}
.login-err { color: var(--red); font-size: 12.5px; min-height: 18px; margin-top: 8px; }

/* ============================ 看板 ============================ */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kanban-col { background: #F7F8FA; border-radius: 12px; padding: 10px; min-height: 120px; }
.kanban-col-head { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; font-size: 12.5px; font-weight: 700; }
.kanban-col-head .cnt { color: var(--ink-400); font-weight: 600; }
.kanban-card {
  background: #fff; border-radius: 10px; padding: 10px 11px;
  box-shadow: 0 1px 3px rgba(16,24,40,.06); margin-bottom: 8px; cursor: pointer;
  border-left: 3px solid var(--ink-300);
}
.kanban-card:hover { box-shadow: 0 4px 14px rgba(16,24,40,.1); }
.kanban-card .t { font-size: 12.5px; font-weight: 600; line-height: 1.5; }
.kanban-card .m { display: flex; align-items: center; gap: 6px; margin-top: 7px; flex-wrap: wrap; }

/* 进度条 */
.progress { height: 7px; border-radius: 4px; background: var(--ink-100); overflow: hidden; min-width: 70px; }
.progress i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #C8102E, #E64A6A); }
.progress.green i { background: linear-gradient(90deg, #12805C, #34C48A); }
.progress.blue i { background: linear-gradient(90deg, #1A73E8, #5AA0F5); }

/* ============================ 日程表 ============================ */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-head {
  text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-500);
  padding: 6px 0; background: #FAFBFC; border-radius: 8px;
}
.cal-cell {
  min-height: 108px; background: #fff; border: 1px solid #EFF1F5;
  border-radius: 11px; padding: 8px; display: flex; flex-direction: column; gap: 5px;
}
.cal-cell.today { border-color: var(--brand-500); box-shadow: 0 0 0 2px rgba(200,16,46,.1); }
.cal-cell.other { opacity: .55; background: #FBFBFC; }
.cal-date { font-size: 12px; font-weight: 700; color: var(--ink-600); display: flex; align-items: center; gap: 6px; }
.cal-date .today-tag { font-size: 10px; color: #fff; background: var(--brand-700); padding: 1px 6px; border-radius: 8px; }
.cal-ev {
  font-size: 11.5px; padding: 4px 7px; border-radius: 7px;
  background: var(--ink-50); border-left: 3px solid var(--blue);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
}
.cal-ev:hover { background: var(--ink-100); }

.day-list { display: flex; flex-direction: column; gap: 9px; }
.day-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border-radius: 12px; background: #fff;
  border: 1px solid #EFF1F5; box-shadow: var(--shadow-card);
}
.day-time {
  width: 96px; flex-shrink: 0; font-size: 12.5px; font-weight: 700; color: var(--ink-600);
  font-variant-numeric: tabular-nums;
}
.day-bar { width: 3px; border-radius: 2px; align-self: stretch; flex-shrink: 0; }

/* ============================ 设置 ============================ */
.setting-tabs { display: flex; flex-direction: column; gap: 4px; }
.setting-tab {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; border-radius: 10px; border: none; background: transparent;
  font-size: 13px; font-weight: 600; color: var(--ink-600); text-align: left; width: 100%;
}
.setting-tab:hover { background: var(--ink-50); }
.setting-tab.active { background: var(--brand-100); color: var(--brand-700); }
.setting-tab svg { width: 16px; height: 16px; }
.setting-panel { display: none; }
.setting-panel.show { display: block; }

.switch {
  width: 40px; height: 22px; border-radius: 11px; background: var(--ink-300);
  position: relative; border: none; transition: background .18s; flex-shrink: 0;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: transform .18s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch.on { background: var(--brand-700); }
.switch.on::after { transform: translateX(18px); }

.setting-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid #F3F4F7;
}
.setting-row:last-child { border-bottom: none; }
.setting-row .info { flex: 1; min-width: 0; }
.setting-row .info .n { font-size: 13px; font-weight: 600; }
.setting-row .info .d { font-size: 11.5px; color: var(--ink-500); margin-top: 2px; }

/* ============================ 标签页 ============================ */
.tag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tag-card {
  background: #fff; border-radius: 12px; padding: 14px;
  border: 1px solid #EFF1F5; box-shadow: var(--shadow-card);
  display: flex; align-items: center; gap: 11px;
}
.tag-swatch {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 15px;
}
.tag-card .n { font-size: 13.5px; font-weight: 700; }
.tag-card .c { font-size: 11.5px; color: var(--ink-500); margin-top: 2px; }
.tag-card .acts { margin-left: auto; display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.tag-card:hover .acts { opacity: 1; }

/* ============================ 会议 ============================ */
.meeting-item {
  border: 1px solid #EFF1F5; border-radius: 12px; padding: 14px 16px;
  background: #fff; box-shadow: var(--shadow-card); margin-bottom: 12px;
}
.meeting-item .h { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.meeting-item .h .t { font-size: 14.5px; font-weight: 700; }
.meeting-item .meta { display: flex; gap: 16px; font-size: 12px; color: var(--ink-500); margin-bottom: 10px; flex-wrap: wrap; }
.meeting-item .block { margin-top: 9px; }
.meeting-item .block h5 {
  font-size: 11.5px; font-weight: 700; color: var(--ink-500);
  margin: 0 0 4px; text-transform: uppercase; letter-spacing: .5px;
}
.meeting-item .block p { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--ink-700); }

/* ============================ 工具类 ============================ */
.flex { display: flex; }
.items-center { align-items: center; }
.gap-6 { gap: 6px; }
.gap-10 { gap: 10px; }
.ml-auto { margin-left: auto; }
.mt-14 { margin-top: 14px; }
.mb-14 { margin-bottom: 14px; }
.hidden { display: none !important; }

.avatar-sm {
  width: 22px; height: 22px; border-radius: 50%; background: var(--brand-100);
  color: var(--brand-700); font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ============================ 响应式 ============================ */
@media (max-width: 1500px) {
  .metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1240px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-row.tasks-schedule, .grid-row.focus-waiting, .grid-row.cols-2, .grid-row.cols-3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 980px) {
  .login-art { display: none; }
  .login-panel { width: 100%; }
  .metrics { grid-template-columns: minmax(0, 1fr); }
  .topbar-search { max-width: none; }
  .brand-sub { display: none; }
}

/* ============================ 设置 · 组织架构与权限矩阵 ============================ */
.ta-c { text-align: center; }
.perm-table td { vertical-align: middle; }
.perm-yes {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand-100); color: var(--brand-700);
  font-size: 12px; font-weight: 800; line-height: 1;
}
.perm-no { color: #C9CDD4; }
.setting-tab svg { flex: none; }
