/* 工作台 · 2026-11-20 统一视觉与交互
   原则：手机优先；桌面是“固定侧栏 + 内容区独立滚动”的应用壳；不引入构建步骤。 */

:root {
  --accent: #0f9f93;
  --accent-dark: #0a7a71;
  --accent-soft: #e7f6f4;
  --accent-line: #c9ebe7;
  --ink: #1f2328;
  --ink-2: #4c545d;
  --muted: #7d858f;
  --muted-2: #a3aab2;
  --line: #e7eaee;
  --line-strong: #d7dce2;
  --bg: #f4f6f7;
  --card: #ffffff;
  --danger: #c9403a;
  --danger-soft: #fdf1f0;
  --success: #17795b;
  --success-soft: #eaf7f1;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-md: 0 10px 30px rgba(16, 24, 40, .10);
  --radius-sm: 9px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --sidebar-w: 232px;
  --content-w: 880px;
  --tabbar-h: 62px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: rgba(15, 159, 147, .18); }

:focus-visible {
  outline: 2px solid rgba(15, 159, 147, .45);
  outline-offset: 2px;
}

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  text-decoration: none;
  transition: top .15s;
}
.skip-link:focus { top: 12px; }

/* ================= 应用壳 ================= */

.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.sidenav { display: none; }

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 246, 247, .9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
}

.topbar-left { min-width: 0; }

.topbar h1 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.view {
  flex: 1;
  min-width: 0;
}

.view-inner {
  width: 100%;
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 6px 16px calc(var(--tabbar-h) + 34px + env(safe-area-inset-bottom));
}

/* 底部导航（手机） */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  gap: 2px;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
}

.tab .icon { width: 20px; height: 20px; }
.tab.active { color: var(--accent-dark); font-weight: 700; }
.tab.active .icon { stroke-width: 2.1; }

/* ================= 桌面 ================= */

@media (min-width: 900px) {
  html, body { height: 100%; overflow: hidden; }

  .app {
    height: 100vh;
    height: 100dvh;
    max-width: 1360px;
    margin: 0 auto;
    flex-direction: row;
    overflow: hidden;
  }

  .sidenav {
    display: flex;
    flex-direction: column;
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    height: 100%;
    padding: 22px 14px 16px;
    background: #fbfcfc;
    border-right: 1px solid var(--line);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .main { height: 100%; overflow: hidden; }

  .topbar { position: static; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 0; }
  .topbar-inner { padding: 26px 32px 18px; }
  .topbar h1 { font-size: 24px; }
  .topbar-sub { font-size: 12.5px; }

  .view {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .view-inner {
    max-width: var(--content-w);
    padding: 4px 32px 80px;
  }

  .tabbar { display: none; }
}

/* ================= 侧栏 ================= */

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 10px 24px;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: block;
  border-radius: 8px;
  filter: drop-shadow(0 5px 10px rgba(10, 122, 113, .22));
}

.brand-text {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
}

.brand-text small {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}

.side-nav { display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, color .15s;
}

.nav-item .icon { color: var(--muted); }
.nav-item:hover { background: #f1f4f4; color: var(--ink); }
.nav-item:hover .icon { color: var(--ink-2); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; }
.nav-item.active .icon { color: var(--accent-dark); }

.sidenav-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-chip {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
}

.user-chip:hover { background: #f1f4f4; }

.avatar-sm {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
}

.user-chip span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-2);
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}

.icon-btn:hover { background: #fafbfb; border-color: var(--line-strong); color: var(--ink); }

/* ================= 通用 ================= */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.card + .card { margin-top: 16px; }
.view-inner > .card:first-child { margin-top: 0; }
.profile-head + .card { margin-top: 16px; }
.big-tabs + .list { margin-top: 16px; }

.inline { display: inline; margin: 0; }

.card h3 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .02em;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-head h3 { margin: 0; }

.new-count { font-size: 11.5px; color: var(--accent-dark); font-weight: 600; }

.empty {
  padding: 34px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: #fafbfb;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  line-height: 1.7;
}

.empty .btn { margin-top: 12px; }

.hint-card {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: #335a56;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footnote {
  margin: 18px 0 0;
  font-size: 11.5px;
  color: var(--muted-2);
  text-align: center;
}

.muted { color: var(--muted); }
.small { font-size: 11.5px; }

.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.visibility-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfb;
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.check-row input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

/* ================= 按钮 ================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}

.btn:hover { background: var(--accent-dark); }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 16px; height: 16px; }

.btn.block { display: flex; width: 100%; }

.btn.ghost {
  background: #fff;
  color: var(--ink-2);
  border-color: var(--line-strong);
}

.btn.ghost:hover { background: #fafbfb; color: var(--ink); }

.btn.danger {
  background: #fff;
  color: var(--danger);
  border-color: #f0cfcc;
}

.btn.danger:hover { background: var(--danger-soft); }

.btn.small { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn.small .icon { width: 14px; height: 14px; }

.topbar-action { display: none; }

.fab {
  position: fixed;
  right: 16px;
  bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom));
  z-index: 25;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 159, 147, .35);
  text-decoration: none;
}

.fab:hover { background: var(--accent-dark); }
.fab .icon { width: 22px; height: 22px; }

@media (min-width: 900px) {
  .topbar-action { display: inline-flex; }
  .fab { display: none; }
}

.icon-action {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink-2);
  text-decoration: none;
}

.icon-action:hover { background: #fafbfb; border-color: var(--line-strong); color: var(--ink); }

/* ================= chips ================= */

.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
}

.chips.scroll, .sub-filters {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.chips.scroll::-webkit-scrollbar, .sub-filters::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

.chip:hover { background: #fafbfb; border-color: var(--line-strong); color: var(--ink); }

.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.chip.plain {
  background: #f3f5f6;
  border-color: transparent;
  color: var(--muted);
  cursor: default;
}

.chip.plain:hover { background: #f3f5f6; border-color: transparent; color: var(--muted); }

.chip.small { height: 24px; padding: 0 9px; font-size: 11.5px; }

.chip.add {
  border-style: dashed;
  border-color: var(--line-strong);
  color: var(--muted);
  padding: 0 12px;
}

.chip.add:hover { color: var(--accent-dark); border-color: var(--accent); background: var(--accent-soft); }

.sub-filters { margin: 0 0 16px; }

/* ================= 表单 ================= */

label {
  display: block;
  margin-bottom: 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

label input, label select, label textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  transition: border-color .15s, box-shadow .15s;
}

label textarea {
  height: auto;
  padding: 10px 12px;
  line-height: 1.65;
  resize: vertical;
}

label input:focus, label select:focus, label textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 159, 147, .12);
}

label input::placeholder, label textarea::placeholder { color: #b0b6be; }

.form-card, .form-grid {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.form-card { padding: 20px; margin-top: 0; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0 14px;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: none;
}

.field-hint {
  display: inline;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted-2);
}

.field-hint a { color: var(--accent-dark); text-decoration: none; }

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.field-block { margin-bottom: 14px; }

.body-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 8px;
}

#body-text {
  display: block;
  width: 100%;
  min-height: 340px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.8;
  resize: vertical;
}

#body-text:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 159, 147, .12);
}

.file-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  background: #fafbfb;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}

.file-btn:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }
.file-btn input[type="file"] { display: none; }
.file-btn.small { padding: 6px 10px; font-size: 12px; }

.form-actions, .form-actions-row, .modal-actions, .dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.form-actions { margin-top: 18px; }
.modal-actions, .dialog-actions { margin-top: 6px; }

.form-actions-row {
  position: sticky;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  z-index: 5;
  margin-top: 22px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 45%);
}

@media (min-width: 900px) {
  .form-actions-row { bottom: 0; }
}

.danger-zone {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.form-error, .form-ok, .alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 16px;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.55;
}

.form-error, .alert.error {
  background: var(--danger-soft);
  color: #a83232;
  border: 1px solid #f1d3d0;
}

.form-ok, .alert.success {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid #cdeadd;
}

.form-error::before, .form-ok::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  margin-top: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* ================= 列表 / 条目 ================= */

.list {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.item, .list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .15s;
}

.item:last-child, .list-item:last-child { border-bottom: 0; }
.item:hover, .list-item:hover { background: #fafbfb; }
.list .empty { border: 0; background: transparent; margin: 0; }

.item-main, .list-main { flex: 1; min-width: 0; }

.item .t, .list-title {
  display: block;
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.item .t a { color: inherit; text-decoration: none; }
.item .t a:hover, .list-title:hover { color: var(--accent-dark); }

.item .m, .list-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.item .m .kind-tag { margin-right: 4px; }

.hidden-intel {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.hidden-intel summary {
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}

.hidden-intel .item { padding: 10px 0; }
.hidden-intel .item:last-child { border-bottom: 0; }

.item .d {
  display: -webkit-box;
  margin-top: 7px;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.list-meta a { color: var(--accent-dark); text-decoration: none; }

.kind-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 6px;
  background: #f2f5f6;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 500;
  vertical-align: 1px;
}

.kind-tag.strong {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border: 1px solid var(--accent-line);
  font-weight: 600;
}

.link-out {
  color: var(--accent-dark);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent-line);
}

.link-out:hover { border-bottom-style: solid; }

.new-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  margin-right: 6px;
  padding: 0 6px;
  border-radius: 5px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-dark);
  font-size: 10.5px;
  font-weight: 700;
  vertical-align: 1px;
}

.thumb {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  margin-right: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  object-fit: cover;
  vertical-align: middle;
}

.row-menu {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s, background .15s, color .15s;
}

.item:hover .row-menu, .list-item:hover .row-menu, .row-menu:focus-visible {
  opacity: 1;
}

.row-menu:hover { background: #eef1f2; color: var(--ink-2); }

@media (max-width: 899px), (hover: none) {
  .row-menu { opacity: 1; }
}

/* 员工状态 */
.status-line {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.status-line:last-child { border-bottom: 0; }
.status-line .name { flex: 1; font-size: 13.5px; }
.status-line .meta { font-size: 11.5px; color: var(--muted); }

.dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #cfd5da;
}

.dot.on { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ================= 搜索 ================= */

.kb-search { position: relative; margin: 0 0 14px; }

.kb-search .search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  pointer-events: none;
}

.search {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}

.search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 159, 147, .12);
}

/* ================= 阅读页 ================= */

.read-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
}

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

.read-title {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}

.read-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.read-date { font-size: 11.5px; color: var(--muted-2); }

.read-actions-icons { display: flex; gap: 8px; flex: 0 0 auto; padding-top: 2px; }

.read {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 28px 30px;
}

.read-body { font-size: 15.5px; line-height: 1.9; color: #333940; }
.read-body p { margin: 0 0 15px; }
.read-body h1, .read-body h2, .read-body h3 { margin: 28px 0 10px; line-height: 1.4; }
.read-body h1 { font-size: 21px; }
.read-body h2 { font-size: 18px; }
.read-body h3 { font-size: 16px; }
.read-body img { max-width: 100%; border-radius: 12px; margin: 12px 0; }
.read-body ul, .read-body ol { padding-left: 22px; margin: 0 0 15px; }
.read-body li { margin-bottom: 6px; }
.read-body blockquote {
  margin: 0 0 15px;
  padding: 10px 15px;
  border-left: 3px solid var(--accent-line);
  border-radius: 0 8px 8px 0;
  background: #f7fbfa;
  color: var(--ink-2);
}
.read-body code { background: #f1f3f4; padding: 1px 6px; border-radius: 5px; font-size: 13px; }
.read-body pre { background: #f6f8f8; padding: 14px 16px; border-radius: 10px; overflow-x: auto; }
.read-body pre code { background: none; padding: 0; }
.read-body a { color: var(--accent-dark); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.back-link:hover { color: var(--accent-dark); }

/* ================= 主页 / 个人 ================= */

.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.profile-avatar {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 24px;
  font-weight: 700;
}

.profile-main { flex: 1; min-width: 0; }
.profile-name { font-size: 18px; font-weight: 700; }
.profile-sub { margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.profile-sub .muted { color: var(--muted-2); }

.pill-link {
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12px;
  text-decoration: none;
}

.pill-link:hover { border-color: var(--accent); color: var(--accent-dark); }

.skills-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

.block-more { margin-left: auto; color: var(--accent-dark); font-size: 12px; text-decoration: none; }
.block-more:hover { text-decoration: underline; }

.big-tabs {
  display: flex;
  gap: 4px;
  margin: 22px 0 0;
  border-bottom: 1px solid var(--line);
}

.big-tab {
  flex: 1;
  padding: 10px 0 12px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--muted);
  font-size: 14.5px;
  text-align: center;
  text-decoration: none;
}

.big-tab:hover { color: var(--ink-2); }
.big-tab.active { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }

.sub-filters { margin-top: 16px; }

/* 头像选择 */
.avatar-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.avatar-option { margin: 0; cursor: pointer; }
.avatar-option input { display: none; }

.avatar-preview {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 2px solid transparent;
  border-radius: 50%;
  background: #f2f4f5;
  color: #6b7075;
  font-size: 20px;
}

.avatar-option input:checked + .avatar-preview {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ================= 员工 ================= */

.agent-row { display: flex; align-items: center; gap: 13px; }
.agent-main { flex: 1; min-width: 0; }
.agent-main .t { font-size: 14.5px; font-weight: 600; }
.agent-main .t a { color: var(--ink); text-decoration: none; }
.agent-main .t a:hover { color: var(--accent-dark); }
.agent-main .m { margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.agent-main .m.muted { color: var(--muted-2); }

.agent-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 17px;
  font-weight: 700;
}

.agent-persona { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.8; }

/* 订阅开关 */
.switch-form { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.switch {
  position: relative;
  width: 40px;
  height: 24px;
  padding: 2px;
  border: 0;
  border-radius: 999px;
  background: #dfe4e8;
  cursor: pointer;
  transition: background .15s;
}

.switch span {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .22);
  transition: transform .15s;
}

.switch.on { background: var(--accent); }
.switch.on span { transform: translateX(16px); }

.switch-label { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* ================= 工具 / 技能 ================= */

.tool-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tool-title { color: var(--ink); font-size: 15px; font-weight: 600; }
.tool-desc { margin-top: 4px; color: var(--muted); font-size: 12px; }

.tool-area {
  width: 100%;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fafbfb;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.7;
  resize: vertical;
}

.tool-area:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 159, 147, .12);
}

.tool-result { margin: 10px 0 0; color: var(--accent-dark); font-size: 12.5px; }

.modal-hint { margin: 0 0 16px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }

.skill-domain { margin-bottom: 20px; }
.skill-domain-name { margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.skill-summary { margin: 0 0 16px; color: var(--muted); font-size: 12.5px; }
.skill-summary strong { color: var(--accent-dark); }

/* ================= 设置 ================= */

.settings-grid { display: grid; gap: 16px; }
.settings-card .status-line { padding: 12px 0; }

/* ================= 对话框 / 菜单 ================= */

.dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 100vw;
}

.dialog::backdrop { background: rgba(20, 24, 26, .42); backdrop-filter: blur(2px); }

.dialog-card {
  width: min(92vw, 400px);
  padding: 24px 22px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(16, 24, 40, .22);
}

.dialog-card h2 { margin: 0 0 16px; font-size: 17px; }

.ctx-menu {
  position: fixed;
  z-index: 60;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(16, 24, 40, .16);
}

.ctx-menu[hidden] { display: none; }

.ctx-item {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font-size: 13.5px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.ctx-item:hover { background: #f4f6f6; }
.ctx-item.danger { color: var(--danger); }
.ctx-item.danger:hover { background: var(--danger-soft); }

/* ================= 反馈 ================= */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom));
  z-index: 120;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  text-align: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
  transition: opacity .2s, transform .2s;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

@media (min-width: 900px) { .toast { bottom: 24px; } }

.net-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 150;
  padding: 8px 14px;
  border-bottom: 1px solid #f0dca6;
  background: #fff4d6;
  color: #7a5a00;
  font-size: 12.5px;
  text-align: center;
}

.net-banner.down {
  border-bottom-color: #f1d3d0;
  background: var(--danger-soft);
  color: #a83232;
}

.page-progress {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 200;
  width: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: width .25s ease, opacity .2s ease;
}

.page-progress.loading { width: 82%; opacity: 1; }

@media (max-width: 899px) {
  .tab { font-size: 10px; }
  .read { padding: 20px 18px; }
  .read-title { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* ================= 登录 ================= */

.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(15, 159, 147, .13), transparent 65%),
    var(--bg);
}

.login-card {
  width: min(100%, 380px);
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 4px;
}

.login-brand .brand-mark { width: 38px; height: 38px; font-size: 17px; }

.login-card h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: .04em;
  text-align: left;
}

.login-hint {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: left;
}

.login-tip {
  margin: 14px 0 0;
  color: var(--muted-2);
  font-size: 11.5px;
  text-align: center;
}

.login-card label { margin-bottom: 14px; }
.login-card .btn { margin-top: 4px; }
