/* ============ 基础变量与重置 ============ */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --border: #e6e9f2;
  --text: #1f2430;
  --text-2: #6b7280;
  --text-3: #9aa1b0;
  --primary: #4f6ef7;
  --primary-dark: #3b57d9;
  --primary-soft: #eef1fe;
  --green: #16a34a;
  --green-soft: #e8f7ee;
  --orange: #f59e0b;
  --orange-soft: #fef4e2;
  --red: #e5484d;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(20, 30, 60, .06), 0 4px 16px rgba(20, 30, 60, .05);
  --shadow-lg: 0 8px 40px rgba(20, 30, 60, .18);
}

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

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--text); }

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

/* ============ 侧边栏 ============ */
.sidebar {
  width: 272px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  gap: 14px;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 6px 6px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #7c5cf0);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-name { font-size: 17px; font-weight: 700; }
.brand-sub { font-size: 12px; color: var(--text-3); }

/* 侧边栏宽度有限，英文品牌名缩小一号保证单行 */
.sidebar .brand-name { font-size: 15px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.panel-head h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

/* ---- 日期导航 ---- */
.date-nav { display: flex; flex-direction: column; gap: 10px; }

.date-nav-btns { display: flex; gap: 8px; align-items: center; }

.btn-today { flex: 1; }

.date-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafbfe;
  outline: none;
}

.date-input:focus { border-color: var(--primary); }

/* ---- 成员列表 ---- */
.member-list { display: flex; flex-direction: column; gap: 4px; }

.member-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s;
}

.member-item:hover { background: #f6f8fd; }

.member-item.active {
  background: var(--primary-soft);
  border-color: #d5ddfb;
}

.member-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.member-info { flex: 1; min-width: 0; }
.member-name { font-weight: 600; font-size: 13px; }
.member-role { font-size: 11px; color: var(--text-3); }

.member-del {
  border: none;
  background: none;
  color: var(--text-3);
  font-size: 15px;
  padding: 2px 6px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity .15s;
}

.member-item:hover .member-del { opacity: 1; }
.member-del:hover { color: var(--red); background: #fdecec; }

.member-all {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-2);
}

/* ---- 近7天工时 ---- */
.week-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 92px;
  padding-top: 6px;
}

.week-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}

.week-bar {
  width: 100%;
  max-width: 22px;
  border-radius: 5px 5px 2px 2px;
  background: #dfe5f5;
  min-height: 3px;
  transition: height .3s;
  position: relative;
}

.week-bar.selected { background: var(--primary); }

.week-bar-val {
  font-size: 10px;
  color: var(--text-3);
  height: 13px;
}

.week-bar-day { font-size: 10px; color: var(--text-3); }
.week-bar-day.selected { color: var(--primary); font-weight: 700; }

/* ---- 数据操作 ---- */
.data-ops {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

.data-ops .btn { width: 100%; }
.data-ops .btn:last-of-type { grid-column: 1 / -1; }

/* ============ 主区域 ============ */
.main {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 48px;
}

.main-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.header-title h1 { font-size: 22px; font-weight: 700; }
.header-title p { font-size: 13px; color: var(--text-2); margin-top: 2px; }

.header-summary {
  display: flex;
  gap: 10px;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}

.summary-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px;
  text-align: center;
  min-width: 92px;
  box-shadow: var(--shadow);
}

.summary-chip b { font-size: 17px; display: block; }
.summary-chip span { font-size: 11px; color: var(--text-3); }
.summary-chip.green b { color: var(--green); }
.summary-chip.blue b { color: var(--primary); }
.summary-chip.orange b { color: var(--orange); }

/* ---- 工具条 ---- */
.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  outline: none;
}

.search-input:focus, .select-input:focus { border-color: var(--primary); }

.select-input {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  outline: none;
}

/* ============ 看板 ============ */
.board { display: flex; flex-direction: column; gap: 16px; }

.member-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.member-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #fbfcff;
}

.member-card-head .member-avatar { width: 36px; height: 36px; font-size: 15px; }

.member-card-title { flex: 1; }
.member-card-title .name { font-weight: 700; font-size: 15px; }
.member-card-title .role { font-size: 12px; color: var(--text-3); }

.member-card-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-2);
}

.member-card-stats b { color: var(--text); }

.member-card-body { padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }

/* ---- 工作条目 ---- */
.entry {
  display: flex;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  transition: box-shadow .15s, border-color .15s;
}

.entry:hover {
  border-color: #cfd9f7;
  box-shadow: 0 3px 12px rgba(79, 110, 247, .08);
}

.entry-time {
  width: 96px;
  flex-shrink: 0;
  border-right: 1px dashed var(--border);
  padding-right: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.entry-time .range { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.entry-time .hours { font-size: 12px; color: var(--primary); font-weight: 600; }
.entry-time .category { margin-top: 6px; }

.entry-main { flex: 1; min-width: 0; }

.entry-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.entry-task { font-weight: 600; font-size: 14px; }

.entry-detail {
  margin-top: 5px;
  font-size: 13px;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.entry-progress-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-track {
  flex: 1;
  max-width: 320px;
  height: 8px;
  background: #eef1f8;
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), #7c5cf0);
  transition: width .3s;
}

.progress-fill.done { background: linear-gradient(90deg, #22c55e, #16a34a); }

.progress-text { font-size: 12px; font-weight: 700; color: var(--text-2); width: 38px; }

.entry-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .15s;
}

.entry:hover .entry-actions { opacity: 1; }

/* ---- 徽章 ---- */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}

.badge-status-todo { background: #f1f3f8; color: var(--text-2); }
.badge-status-doing { background: var(--orange-soft); color: #b45309; }
.badge-status-done { background: var(--green-soft); color: var(--green); }

.badge-category { background: #f1f3f8; color: var(--text-2); }

/* ---- 空状态 ---- */
.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-3);
}

.empty-state .icon { font-size: 40px; margin-bottom: 12px; }
.empty-state p { margin-bottom: 16px; }

/* ============ 按钮 ============ */
.btn {
  border: none;
  border-radius: 9px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  transition: all .15s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(79, 110, 247, .28);
}
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 3px 12px rgba(79, 110, 247, .36); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 1px 4px rgba(79, 110, 247, .3); }

.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
}

.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.btn-mini {
  padding: 3px 10px;
  font-size: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 7px;
}

.btn-mini:hover { background: #dde4fd; }

.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 7px; }

.btn-danger-ghost {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-3);
}

.btn-danger-ghost:hover { border-color: var(--red); color: var(--red); background: #fef2f2; }

.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #cf3a3f; }

/* ---- 删除项目选择 ---- */
.delete-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}

.radio-group { display: flex; flex-direction: column; gap: 8px; }

.radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  transition: all .15s;
  background: #fafbfe;
}

.radio-option:hover { border-color: var(--primary); }

.radio-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.radio-option-danger:has(input:checked) {
  border-color: var(--red);
  background: #fef2f2;
}

.radio-option input { accent-color: var(--primary); flex-shrink: 0; }
.radio-option-danger input { accent-color: var(--red); }

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 17px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 40, .45);
  backdrop-filter: blur(2px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 16px 16px;
  z-index: 100;
  overflow-y: auto;
}

.modal-mask.open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: 16px;
  width: 560px;
  max-width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modalIn .18s ease-out;
}

.modal-sm { width: 420px; }

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-12px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px 14px;
  border-bottom: 1px solid var(--border);
}

.modal-head h2 { font-size: 16px; font-weight: 700; }

.modal-close { border: none; background: none; font-size: 22px; color: var(--text-3); }
.modal-close:hover { color: var(--text); }

.modal-body { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 14px; }

.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.form-group label em { color: var(--red); font-style: normal; }
.form-group label b { color: var(--primary); }

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group select,
.form-group textarea {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fafbfe;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  width: 100%;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover { border-color: #cfd6e8; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 110, 247, .12);
}

.form-group textarea { resize: vertical; min-height: 64px; }

input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
  height: 26px;
}

.progress-scale {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-3);
}

.color-swatches { display: flex; gap: 10px; flex-wrap: wrap; }

.color-swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform .1s;
}

.color-swatch:hover { transform: scale(1.12); }
.color-swatch.selected { border-color: var(--text); box-shadow: 0 0 0 2px #fff inset; }

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

/* ============ 登录页 ============ */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(720px 380px at 88% -10%, rgba(124, 92, 240, .16), transparent 62%),
    radial-gradient(640px 360px at -6% 108%, rgba(14, 165, 164, .12), transparent 62%),
    linear-gradient(135deg, #eef1fe 0%, #f4f6fb 50%, #e9f0ff 100%);
}

.login-card {
  width: 380px;
  max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-brand { padding: 0 0 6px; }

.login-card input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fafbfe;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.login-card input[type="password"]:hover { border-color: #cfd6e8; }

.login-card input[type="password"]:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 110, 247, .12);
}

.login-error {
  color: var(--red);
  background: #fdebec;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
}

.login-remember input { accent-color: var(--primary); }

.login-btn { width: 100%; }

.login-tip {
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
}

/* ============ Toast ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%) translateY(20px);
  background: #1f2430;
  color: #fff;
  padding: 10px 22px;
  border-radius: 99px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: all .25s;
  z-index: 200;
  box-shadow: var(--shadow-lg);
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .app { flex-direction: column; height: auto; overflow: visible; }
  body { overflow: auto; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .main { padding: 18px 14px 40px; }
  .header-summary { justify-content: flex-start; }
  .entry { flex-direction: column; }
  .entry-time {
    width: 100%;
    border-right: none;
    border-bottom: 1px dashed var(--border);
    padding: 0 0 8px;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  .entry-actions { flex-direction: row; opacity: 1; }
  .proj-entry { flex-wrap: wrap; }
  .pe-time { width: auto; border-left: none; padding-left: 0; }
}

/* ============ 通用工具类 ============ */
.hidden { display: none !important; }

/* ============ 视图切换 ============ */
.view-switch {
  display: flex;
  background: #eceff7;
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.view-switch button {
  border: none;
  background: none;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  transition: all .15s;
  white-space: nowrap;
}

.view-switch button.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(20, 30, 60, .1);
}

/* ============ 项目标签栏 ============ */
.project-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}

.project-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}

.project-tab:hover { border-color: var(--pc); }

.project-tab.active {
  border-color: var(--pc);
  background: color-mix(in srgb, var(--pc) 9%, #fff);
  color: var(--text);
}

.pt-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pc);
  flex-shrink: 0;
}

.pt-cnt {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  background: #f1f3f8;
  padding: 0 7px;
  border-radius: 99px;
}

.pt-del {
  border: none;
  background: none;
  color: var(--text-3);
  font-size: 14px;
  line-height: 1;
  padding: 1px 3px;
  border-radius: 5px;
  opacity: 0;
  transition: opacity .15s;
}

.project-tab:hover .pt-del { opacity: 1; }
.pt-del:hover { color: var(--red); background: #fdecec; }

/* ============ 项目概览 ============ */
.project-overview {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--pc);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

.po-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pc);
  flex-shrink: 0;
}

.po-name { font-size: 16px; font-weight: 700; }

.po-meta { font-size: 13px; color: var(--text-2); }

.po-doc {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 99px;
  background: #eef2ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.po-doc:hover { text-decoration: underline; }

.po-edit { margin-left: auto; flex-shrink: 0; }

.badge-link {
  background: #eef2ff;
  color: var(--primary);
  text-decoration: none;
}
.badge-link:hover { text-decoration: underline; }

/* ============ 项目视图记录行 ============ */
.proj-entry {
  display: flex;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  transition: box-shadow .15s, border-color .15s;
}

.proj-entry:hover {
  border-color: #cfd9f7;
  box-shadow: 0 3px 12px rgba(79, 110, 247, .08);
}

.pe-date {
  width: 52px;
  flex-shrink: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px dashed var(--border);
  padding-right: 12px;
}

.pe-date b { font-size: 14px; font-variant-numeric: tabular-nums; }
.pe-date span { font-size: 11px; color: var(--text-3); }

.pe-main { flex: 1; min-width: 0; }

.pe-time {
  width: 108px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  border-left: 1px dashed var(--border);
  padding-left: 12px;
  font-variant-numeric: tabular-nums;
}

.pe-time b { color: var(--primary); font-size: 13px; }

.proj-entry .entry-actions { justify-content: center; }

/* ============ OKR 视图 ============ */
.okr-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.okr-tip { font-size: 13px; color: var(--text-2); }

.okr-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
}

.okr-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, #f7f8fe, #fbfcff);
}

.okr-flag {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #f59e0b, #ef6c2b);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.okr-head-main { flex: 1; min-width: 0; }
.okr-objective { font-size: 15px; font-weight: 700; }
.okr-period { font-size: 12px; color: var(--text-3); margin-top: 1px; }

.okr-head-stats {
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
}

.okr-head-stats b { color: var(--orange); font-size: 15px; }

.okr-body { padding: 10px 18px 14px; }

/* ---- KR 行 ---- */
.kr-row {
  padding: 12px 0;
}

.kr-row + .kr-row { border-top: 1px dashed var(--border); }

.kr-main { cursor: pointer; }

.kr-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.kr-title { font-size: 13.5px; font-weight: 600; }

.kr-progress-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
  flex-shrink: 0;
}

.kr-row .progress-track { max-width: none; height: 6px; }
.kr-row .progress-fill { background: linear-gradient(90deg, #f59e0b, #ef6c2b); }
.kr-row .progress-fill.done { background: linear-gradient(90deg, #22c55e, #16a34a); }

.kr-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-2);
  flex-wrap: wrap;
}

.kr-meta b { color: var(--text); }

.kr-avatars { display: flex; gap: 3px; align-items: center; }

.kr-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 1px var(--border);
}

.kr-noone { color: var(--text-3); }

.kr-expand-hint {
  margin-left: auto;
  color: var(--primary);
  font-weight: 600;
}

.kr-entries {
  margin-top: 10px;
  padding: 10px;
  background: #f8f9fd;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kr-entries .proj-entry { background: #fff; }

.kr-empty {
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  padding: 16px 0;
}

/* ---- OKR 表单中的 KR 动态行 ---- */
.kr-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }

.kr-form-row { display: flex; gap: 8px; align-items: center; }

.kr-title-input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fafbfe;
  outline: none;
}

.kr-title-input:focus { border-color: var(--primary); background: #fff; }

.kr-progress-input {
  width: 76px;
  padding: 9px 8px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fafbfe;
  outline: none;
}

.kr-progress-input:focus { border-color: var(--primary); }

.kr-remove { flex-shrink: 0; }

/* ---- 按天视图中的 KR 徽章 ---- */
.badge-kr { background: var(--orange-soft); color: #b45309; }

/* ============ 会议纪要批量导入 ============ */
.bulk-import-text {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #f8f9fd;
  outline: none;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  resize: vertical;
  min-height: 160px;
}

.bulk-import-text:focus { border-color: var(--primary); background: #fff; }

.import-feedback {
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 12.5px;
  line-height: 1.7;
}

.import-feedback.error { background: #fef2f2; color: var(--red); border: 1px solid #fcd7d8; }
.import-feedback.warn { background: var(--orange-soft); color: #b45309; border: 1px solid #f7e3bd; }

.format-help { font-size: 13px; color: var(--text-2); }

.format-help summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 600;
  user-select: none;
}

.format-table {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
}

.format-table td {
  padding: 6px 10px;
  border: 1px solid var(--border);
  vertical-align: top;
  font-size: 12.5px;
}

.format-table td:first-child {
  white-space: nowrap;
  background: #f8f9fd;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.format-table b { color: var(--primary); }

/* ============ 周报中心 ============ */
.muted { color: var(--text-3); font-weight: 400; font-size: 12px; }

.report-panel { display: flex; flex-direction: column; gap: 14px; }

.report-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  box-shadow: var(--shadow);
  width: fit-content;
}

.report-week-label {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  min-width: 118px;
  text-align: center;
}

.report-section-title {
  font-size: 14px;
  font-weight: 700;
  margin-top: 4px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---- 授权卡片 ---- */
.auth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
}

.auth-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  box-shadow: var(--shadow);
}

.auth-card.granted { border-left: 4px solid var(--green); }
.auth-card.pending { border-left: 4px solid var(--orange); }
.auth-card.none { border-left: 4px solid #c9cfdd; }

.auth-card-info { flex: 1; min-width: 0; }

.auth-card-name { font-weight: 700; font-size: 14px; }

.auth-card-role {
  font-size: 11px;
  color: var(--text-3);
  margin-left: 8px;
  font-weight: 400;
}

.auth-card-status { font-size: 12px; color: var(--text-2); margin-top: 2px; }

.auth-card .btn { flex-shrink: 0; }

/* ---- 侧边栏授权徽章 ---- */
.auth-badge {
  display: inline-block;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 10px;
  line-height: 1.7;
  cursor: pointer;
  vertical-align: 1px;
  white-space: nowrap;
}

.auth-badge.granted { background: var(--green-soft); color: var(--green); }
.auth-badge.pending { background: var(--orange-soft); color: #b45309; }
.auth-badge.none { background: #f1f3f8; color: var(--text-3); }

/* ---- 生成区与预览 ---- */
.report-generate-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.report-generate-bar .btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.report-preview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.report-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #fbfcff;
  flex-wrap: wrap;
}

.bot-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 99px;
}

.report-actions { display: flex; gap: 8px; }

.report-pre {
  margin: 0;
  padding: 18px 20px;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 56vh;
  overflow-y: auto;
  color: var(--text);
}

/* ============ 小助手配置弹窗 ============ */
.bot-profile {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--primary-soft);
  border-radius: 10px;
  padding: 12px 14px;
}

.bot-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #7c5cf0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.bot-profile-desc { font-size: 12px; color: var(--text-2); line-height: 1.6; }

.switch-label {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-weight: 500 !important;
}

.switch-label input { accent-color: var(--primary); margin-top: 3px; }
.switch-label span { font-size: 13px; line-height: 1.5; }
