/* ==========================================================================
   任务 OA · 设计系统
   企业微信自建应用：H5 与 PC 共用一套样式
   ========================================================================== */

:root {
  --brand: #0082ef;
  --brand-strong: #0b6fd0;
  --brand-soft: #eaf4fe;
  --brand-soft-2: #d6eaff;
  --text: #1f2329;
  --text-2: #5b6370;
  --text-3: #8a929e;
  --text-4: #aeb5bf;
  --line: #e8eaee;
  --line-strong: #d9dde4;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --success: #12a150;
  --success-soft: #e7f8ee;
  --warning: #e08a00;
  --warning-soft: #fff4e0;
  --danger: #e34d59;
  --danger-soft: #fdecee;
  --purple: #6b4ff0;
  --purple-soft: #efecff;
  --gray-soft: #eef0f3;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(31, 35, 41, 0.04);
  --shadow: 0 2px 8px rgba(31, 35, 41, 0.06), 0 12px 32px -16px rgba(31, 35, 41, 0.18);
  --shadow-lg: 0 24px 64px -24px rgba(31, 35, 41, 0.32);
  --sidebar-w: 236px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--brand);
  text-decoration: none;
}

button {
  font-family: inherit;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

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

/* ---------------------------------------------------------------- 启动 */

.boot-screen {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.boot-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), #45a9ff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.5px;
  box-shadow: 0 12px 24px -8px rgba(0, 130, 239, 0.5);
}

.boot-text {
  color: var(--text-3);
  font-size: 13px;
}

/* ---------------------------------------------------------------- 布局 */

.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 30;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 18px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #57b2ff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 14px -6px rgba(0, 130, 239, 0.65);
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.brand-sub {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 1px;
}

.sidebar-nav {
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.nav-label {
  font-size: 11px;
  color: var(--text-4);
  padding: 14px 10px 6px;
  letter-spacing: 0.6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--text-2);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
  position: relative;
  user-select: none;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex: none;
  opacity: 0.85;
}

.nav-item:hover {
  background: #f5f7fa;
  color: var(--text);
}

.nav-item.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 500;
}

.nav-item.active svg {
  opacity: 1;
}

.nav-count {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}

.nav-count.soft {
  background: var(--brand-soft-2);
  color: var(--brand-strong);
}

.sidebar-user {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  cursor: default;
}

.user-card:hover {
  background: var(--surface-2);
}

.user-meta {
  min-width: 0;
  flex: 1;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dept {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  background: rgba(244, 246, 249, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
}

.topbar.scrolled {
  border-bottom-color: var(--line);
}

.topbar-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.topbar-sub {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 1px;
}

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

.search-inline {
  position: relative;
  width: 240px;
}

.search-inline input {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 17px;
  padding: 0 12px 0 34px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.search-inline input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 130, 239, 0.12);
}

.search-inline svg {
  position: absolute;
  left: 11px;
  top: 9px;
  width: 16px;
  height: 16px;
  color: var(--text-3);
}

.page {
  padding: 6px 28px 48px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.page-narrow {
  max-width: 880px;
}

.mobile-header,
.mobile-nav {
  display: none;
}

/* ---------------------------------------------------------------- 文字 */

.h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.2px;
  line-height: 1.35;
}

.h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

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

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

.small {
  font-size: 12px;
}

.mono {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pre-wrap {
  white-space: pre-wrap;
  word-break: break-word;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px 0 12px;
}

.section-head .h2 {
  flex: 1;
}

.section-link {
  font-size: 13px;
  color: var(--brand);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* ---------------------------------------------------------------- 按钮 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 15px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.06s ease, box-shadow 0.14s ease;
  white-space: nowrap;
  user-select: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 14px -8px rgba(0, 130, 239, 0.8);
}
.btn-primary:hover {
  background: var(--brand-strong);
}

.btn-secondary {
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-secondary:hover {
  background: #f7f9fb;
  border-color: #c9cfd8;
}

.btn-soft {
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.btn-soft:hover {
  background: var(--brand-soft-2);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  filter: brightness(0.95);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  padding: 0 10px;
}
.btn-ghost:hover {
  background: var(--gray-soft);
  color: var(--text);
}

.btn-sm {
  height: 30px;
  padding: 0 11px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-lg {
  height: 44px;
  padding: 0 22px;
  font-size: 15px;
  border-radius: 10px;
}

.btn-block {
  width: 100%;
}

.btn[disabled],
.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  position: relative;
}
.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}
.icon-btn svg {
  width: 17px;
  height: 17px;
}

.dot-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  border: 1.5px solid #fff;
}

/* ---------------------------------------------------------------- 卡片 */

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

.card + .card {
  margin-top: 14px;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.card-head .h2 {
  flex: 1;
}

.card-body {
  padding: 18px;
}

.card-body.tight {
  padding: 4px 0;
}

.card-soft {
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 16px;
}

/* ---------------------------------------------------------------- 状态 */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1;
}

.chip .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.chip-pending_receive {
  background: var(--warning-soft);
  color: #b06d00;
}
.chip-in_progress {
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.chip-pending_review {
  background: var(--purple-soft);
  color: var(--purple);
}
.chip-rejected {
  background: var(--danger-soft);
  color: var(--danger);
}
.chip-completed {
  background: var(--success-soft);
  color: var(--success);
}
.chip-withdrawn {
  background: var(--gray-soft);
  color: var(--text-3);
}
.chip-terminated {
  background: #eceef1;
  color: #6b7280;
}

.chip-outline {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text-2);
}
.chip-brand {
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.chip-danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.chip-success {
  background: var(--success-soft);
  color: var(--success);
}
.chip-gray {
  background: var(--gray-soft);
  color: var(--text-2);
}
.chip-warning {
  background: var(--warning-soft);
  color: #b06d00;
}

.overdue-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 8px;
  border-radius: 6px;
  background: #fff1f1;
  color: var(--danger);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #ffd9dc;
  white-space: nowrap;
}

.role-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 11px;
  background: var(--gray-soft);
  color: var(--text-2);
}
.role-tag.is-main {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

/* ---------------------------------------------------------------- 首页 */

.hello {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 14px 0 20px;
}

.hello h1 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.hello-sub {
  color: var(--text-3);
  font-size: 13px;
  padding-bottom: 4px;
}

.hello-actions {
  margin-left: auto;
  display: none;
  gap: 8px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  border-color: #cfe4fb;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.stat-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand) inset, var(--shadow);
}

.stat-top {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 13px;
}

.stat-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-icon svg {
  width: 15px;
  height: 15px;
}
.stat-icon.blue {
  background: var(--brand-soft);
  color: var(--brand);
}
.stat-icon.amber {
  background: var(--warning-soft);
  color: var(--warning);
}
.stat-icon.purple {
  background: var(--purple-soft);
  color: var(--purple);
}
.stat-icon.green {
  background: var(--success-soft);
  color: var(--success);
}

.stat-value {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.5px;
  margin-top: 12px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-foot {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
}

.stat-foot .red {
  color: var(--danger);
  font-weight: 500;
}

/* ---------------------------------------------------------------- 列表 */

.list {
  display: flex;
  flex-direction: column;
}

.list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.14s ease;
  position: relative;
}

.list-row:first-child {
  border-top: none;
}

.list-row:hover {
  background: #fafbfd;
}

.list-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: transparent;
}

.list-row.unread::before {
  background: var(--brand);
}

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

.list-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
}

.list-title .name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.list-meta .sep {
  width: 1px;
  height: 10px;
  background: var(--line-strong);
}

.list-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.chev {
  color: var(--text-4);
  width: 16px;
  height: 16px;
}

.avatar {
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex: none;
  overflow: hidden;
  user-select: none;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-stack {
  display: flex;
  align-items: center;
}
.avatar-stack .avatar {
  border: 2px solid #fff;
  margin-left: -6px;
}
.avatar-stack .avatar:first-child {
  margin-left: 0;
}

.progress-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
}
.progress-bar {
  width: 54px;
  height: 4px;
  border-radius: 2px;
  background: var(--gray-soft);
  overflow: hidden;
}
.progress-bar > i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--brand);
}

/* ---------------------------------------------------------------- 折叠 */

.fold {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.fold-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  cursor: pointer;
  user-select: none;
}

.fold-head:hover {
  background: #fafbfd;
}

.fold-title {
  font-size: 15px;
  font-weight: 600;
}

.fold-count {
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 10px;
  background: var(--gray-soft);
  color: var(--text-2);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.fold-count.hot {
  background: var(--danger-soft);
  color: var(--danger);
}

.fold-arrow {
  margin-left: auto;
  color: var(--text-3);
  transition: transform 0.2s ease;
  width: 18px;
  height: 18px;
}

.fold.collapsed .fold-arrow {
  transform: rotate(-90deg);
}

.fold-body {
  border-top: 1px solid var(--line);
}

.fold.collapsed .fold-body {
  display: none;
}

.fold-foot {
  padding: 11px 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  cursor: pointer;
}
.fold-foot:hover {
  color: var(--brand);
  background: #fafbfd;
}

/* ---------------------------------------------------------------- 筛选 */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.seg {
  display: inline-flex;
  padding: 3px;
  background: #f0f2f5;
  border-radius: 9px;
  gap: 2px;
}

.seg button {
  height: 28px;
  padding: 0 12px;
  border: none;
  background: transparent;
  border-radius: 7px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
}

.seg button.on {
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(31, 35, 41, 0.08);
}

.field-inline {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 10px;
  font-size: 12px;
  color: var(--text);
  outline: none;
  font-family: inherit;
}
.field-inline:focus {
  border-color: var(--brand);
}

select.field-inline {
  padding-right: 24px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a929e' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.filter-spacer {
  margin-left: auto;
}

/* ---------------------------------------------------------------- 表单 */

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

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 5px;
}

.label .req {
  color: var(--danger);
  font-size: 13px;
  line-height: 1;
}

.label .tip {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-3);
  font-weight: 400;
}

.input,
.textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  padding: 9px 12px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  font-family: inherit;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.input {
  height: 38px;
}

.textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.65;
}

.input:focus,
.textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 130, 239, 0.1);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-4);
}

.input.invalid,
.textarea.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(227, 77, 89, 0.1);
}

.field-error {
  font-size: 12px;
  color: var(--danger);
}

.counter {
  text-align: right;
  font-size: 11px;
  color: var(--text-4);
  font-variant-numeric: tabular-nums;
}
.counter.warn {
  color: var(--danger);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.error-banner {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: var(--danger-soft);
  border: 1px solid #ffd9dc;
  border-radius: 10px;
  color: #b4232d;
  font-size: 13px;
  line-height: 1.6;
}
.error-banner svg {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 1px;
}
.error-banner ul {
  margin: 4px 0 0;
  padding-left: 16px;
}

.tip-box {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: var(--brand-soft);
  border-radius: 9px;
  color: var(--brand-strong);
  font-size: 12px;
  line-height: 1.6;
}
.tip-box svg {
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 2px;
}

.participant-board {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.participant-slot {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--surface-2);
}

.participant-slot-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 8px;
}

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

.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 10px 0 5px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 17px;
  font-size: 13px;
  max-width: 100%;
}
.person-chip .avatar {
  width: 24px;
  height: 24px;
  font-size: 11px;
}
.person-chip .x {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #eceef1;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  padding: 0;
}
.person-chip .x:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.add-person {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 17px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
}
.add-person:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

.uploader {
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  cursor: pointer;
  background: var(--surface-2);
  transition: border-color 0.14s ease, background 0.14s ease;
}
.uploader:hover,
.uploader.drag {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.uploader input {
  display: none;
}
.uploader svg {
  display: block;
  margin: 0 auto 6px;
  width: 22px;
  height: 22px;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  font-size: 13px;
}

.file-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex: none;
  text-transform: uppercase;
}

.file-meta {
  min-width: 0;
  flex: 1;
}
.file-name {
  display: block;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-sub {
  display: block;
  font-size: 11px;
  color: var(--text-3);
  margin-top: 1px;
}

.upload-progress {
  height: 4px;
  background: var(--gray-soft);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 10px;
}
.upload-progress > i {
  display: block;
  height: 100%;
  background: var(--brand);
  width: 0;
  transition: width 0.2s ease;
}

/* ---------------------------------------------------------------- 详情 */

.detail-head {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}

.detail-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-no {
  font-size: 12px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}

.detail-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
  margin-top: 10px;
  word-break: break-word;
  max-width: 880px;
}

.detail-sub {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-2);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
}

.meta-item .k {
  font-size: 12px;
  color: var(--text-3);
}
.meta-item .v {
  font-size: 14px;
  margin-top: 3px;
  font-weight: 500;
}

.content-text {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.person-list {
  display: flex;
  flex-direction: column;
}

.person-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
}
.person-row:first-child {
  border-top: none;
}

.person-row .who {
  min-width: 0;
  flex: 1;
}
.person-row .who .n {
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.person-row .who .d {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 1px;
}

.substate {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  height: 24px;
  padding: 0 9px;
  border-radius: 12px;
}
.substate.received {
  background: var(--brand-soft);
  border-color: transparent;
  color: var(--brand-strong);
}
.substate.submitted {
  background: var(--success-soft);
  border-color: transparent;
  color: var(--success);
}

.feedback-box {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 8px;
}

.timeline {
  display: flex;
  flex-direction: column;
  padding: 4px 18px 8px;
}

.tl-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  position: relative;
}

.tl-item + .tl-item {
  border-top: 1px dashed var(--line);
}

.tl-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}
.tl-dot.reject {
  background: var(--danger-soft);
  color: var(--danger);
}
.tl-dot.pass {
  background: var(--success-soft);
  color: var(--success);
}

.tl-body {
  flex: 1;
  min-width: 0;
}

.tl-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  flex-wrap: wrap;
}

.tl-time {
  font-size: 11px;
  color: var(--text-3);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

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

.kv {
  display: flex;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
}
.kv b {
  color: var(--text-2);
  font-weight: 500;
}

.action-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.sticky-actions {
  display: none;
}

.notice-card {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.7;
  margin-top: 12px;
}
.notice-card.amber {
  background: var(--warning-soft);
  color: #8a5700;
  border: 1px solid #ffe4b5;
}
.notice-card.red {
  background: var(--danger-soft);
  color: #a52530;
  border: 1px solid #ffd9dc;
}
.notice-card.blue {
  background: var(--brand-soft);
  color: var(--brand-strong);
  border: 1px solid #cfe4fb;
}
.notice-card b {
  font-weight: 600;
}

/* ---------------------------------------------------------------- 表格 */

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 720px;
}

.table th {
  text-align: left;
  font-weight: 500;
  color: var(--text-3);
  font-size: 12px;
  padding: 11px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  user-select: none;
}

.table th.sortable {
  cursor: pointer;
}
.table th.sortable:hover {
  color: var(--text);
}

.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table tbody tr {
  cursor: pointer;
}
.table tbody tr:hover {
  background: #fafbfd;
}

.table .t-name {
  font-weight: 500;
  max-width: 320px;
}

.table-empty {
  padding: 40px;
  text-align: center;
  color: var(--text-3);
}

/* ---------------------------------------------------------------- 空状态 */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
}

.empty-ico {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-4);
  margin-bottom: 12px;
}
.empty-ico svg {
  width: 26px;
  height: 26px;
}

.empty-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
}

.empty-desc {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
  max-width: 300px;
  line-height: 1.6;
}

/* ---------------------------------------------------------------- 分页 */

.pager {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-3);
}

.pager .pages {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.page-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
}
.page-btn:hover:not(:disabled) {
  border-color: var(--brand);
  color: var(--brand);
}
.page-btn.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------------------------------------------------------------- 弹窗 */

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(2px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade-in 0.16s ease;
}

.modal {
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: pop-in 0.18s cubic-bezier(0.2, 0.8, 0.3, 1);
  overflow: hidden;
}

.modal.wide {
  max-width: 680px;
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 14px;
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  flex: 1;
}

.modal-body {
  padding: 4px 20px 18px;
  overflow-y: auto;
}

.modal-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  background: var(--surface);
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: var(--surface-2);
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover {
  background: var(--gray-soft);
  color: var(--text);
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------------- 轻提示 */

.toast-root {
  position: fixed;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: min(92vw, 420px);
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 15px;
  background: #1f2329;
  color: #fff;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 12px 32px -12px rgba(15, 23, 42, 0.6);
  animation: toast-in 0.2s ease;
  max-width: 100%;
  word-break: break-word;
}

.toast.success {
  background: #0e7a3e;
}
.toast.error {
  background: #b4232d;
}
.toast svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------------- 登录 */

.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--surface);
}

.login-hero {
  background: radial-gradient(1200px 600px at 10% 0%, #1f9bff 0%, #0082ef 45%, #0b5cb8 100%);
  color: #fff;
  padding: 56px 56px 48px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.login-hero::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  right: -160px;
  bottom: -200px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.login-headline {
  font-size: 38px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-top: auto;
}

.login-desc {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.82);
  max-width: 420px;
}

.login-points {
  display: flex;
  gap: 22px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.login-point .n {
  font-size: 22px;
  font-weight: 600;
}
.login-point .t {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 2px;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.login-card {
  width: 100%;
  max-width: 380px;
}

.login-title {
  font-size: 22px;
  font-weight: 600;
}

.login-sub {
  color: var(--text-3);
  font-size: 13px;
  margin-top: 6px;
  line-height: 1.7;
}

.login-users {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 4px;
}

.login-user {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.14s ease, background 0.14s ease;
  text-align: left;
  width: 100%;
  font-family: inherit;
}

.login-user:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.login-user > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.login-user .nm {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  display: block;
}
.login-user .dp {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 1px;
  display: block;
}

.login-user .go {
  margin-left: auto;
  color: var(--text-4);
}

.login-error {
  margin-top: 16px;
}

.login-foot {
  margin-top: 18px;
  font-size: 11px;
  color: var(--text-4);
  line-height: 1.8;
}

/* ---------------------------------------------------------------- 消息 */

.msg-row {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.msg-row:first-child {
  border-top: none;
}
.msg-row:hover {
  background: #fafbfd;
}

.msg-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  color: var(--brand);
}
.msg-ico svg {
  width: 17px;
  height: 17px;
}

.msg-body {
  min-width: 0;
  flex: 1;
}
.msg-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}
.msg-text {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 3px;
  line-height: 1.6;
}
.msg-time {
  font-size: 11px;
  color: var(--text-4);
  flex: none;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- 杂项 */

.skeleton {
  background: linear-gradient(90deg, #eef0f3 25%, #f6f7f9 37%, #eef0f3 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

.skeleton-row {
  height: 58px;
  margin: 12px 18px;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}

.spacer {
  flex: 1;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wrap {
  flex-wrap: wrap;
}

.between {
  justify-content: space-between;
}

.tag-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.hide {
  display: none !important;
}

.only-sm {
  display: none;
}

@media (max-width: 860px) {
  .hide-sm {
    display: none !important;
  }
  .only-sm {
    display: inline-flex;
  }
  .filter-bar .adv {
    display: none;
  }
  .filter-bar.expanded .adv {
    display: inline-flex;
  }
  .filter-bar.expanded .adv.small {
    display: inline;
  }
  .btn.on {
    background: var(--brand-soft);
    border-color: var(--brand);
    color: var(--brand-strong);
  }
}

.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-brand { color: var(--brand); }

.clickable {
  cursor: pointer;
}

.celebrate {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 10px 8px;
  text-align: center;
}
.celebrate-ico {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  background: var(--success-soft);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.celebrate-ico svg {
  width: 30px;
  height: 30px;
}

.dev-tools {
  border: 1px dashed #cfe4fb;
  background: #f7fbff;
  border-radius: 10px;
  padding: 14px;
}

/* ---------------------------------------------------------------- 响应式 */

@media (max-width: 1080px) {
  :root {
    --sidebar-w: 208px;
  }
  .page {
    padding: 6px 20px 44px;
  }
  .topbar {
    padding: 0 20px;
  }
  .search-inline {
    width: 190px;
  }
  .meta-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .shell {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .main {
    margin-left: 0;
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }
  .topbar {
    display: none;
  }

  .mobile-header {
    display: flex;
    align-items: center;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 25;
    height: 52px;
    padding: 0 16px;
    background: rgba(244, 246, 249, 0.94);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .mobile-header .t {
    font-size: 16px;
    font-weight: 600;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page {
    padding: 12px 14px 28px;
  }

  .hello {
    padding: 6px 0 14px;
    align-items: center;
  }
  .hello h1 {
    font-size: 20px;
  }
  .hello-sub {
    display: none;
  }
  .hello-actions {
    display: flex;
  }
  .hello-actions .btn span {
    display: none;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .stat-card {
    padding: 13px 14px 12px;
  }
  .stat-value {
    font-size: 24px;
    margin-top: 9px;
  }
  .stat-top {
    font-size: 12px;
  }

  .mobile-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mnav {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 56px;
    color: var(--text-3);
    font-size: 10px;
    cursor: pointer;
    position: relative;
    background: none;
    border: none;
    font-family: inherit;
  }
  .mnav svg {
    width: 21px;
    height: 21px;
  }
  .mnav.active {
    color: var(--brand);
  }
  .mnav .nav-count {
    position: absolute;
    top: 5px;
    left: 50%;
    margin-left: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    border-radius: 8px;
  }

  .list-row {
    padding: 13px 14px;
    gap: 10px;
    align-items: flex-start;
  }
  .list-side {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }
  .list-title {
    font-size: 14px;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  .list-title .name {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .list-meta {
    font-size: 11px;
  }
  .fold-head {
    padding: 13px 14px;
  }
  .fold-foot {
    padding: 10px 14px;
  }

  .card-head {
    padding: 14px;
  }
  .card-body {
    padding: 14px;
  }
  .card-body.tight {
    padding: 0;
  }

  .detail-head {
    padding: 16px;
    border-radius: 12px;
  }
  .detail-title {
    font-size: 17px;
  }
  .meta-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 14px 16px;
    gap: 12px;
    margin-top: 12px;
  }
  .person-row {
    padding: 11px 14px;
    flex-wrap: wrap;
  }
  .timeline {
    padding: 4px 14px 6px;
  }
  .tl-time {
    width: 100%;
    margin-left: 0;
    margin-top: 3px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .modal-mask {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    animation: sheet-in 0.24s cubic-bezier(0.2, 0.8, 0.3, 1);
  }
  .modal-body {
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }
  .modal-foot {
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }
  @keyframes sheet-in {
    from {
      transform: translateY(24px);
      opacity: 0.6;
    }
    to {
      transform: none;
      opacity: 1;
    }
  }

  .action-bar {
    display: none;
  }
  .sticky-actions {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(56px + env(safe-area-inset-bottom));
    z-index: 22;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--line);
  }
  .sticky-actions .btn {
    flex: 1;
    height: 42px;
  }
  .sticky-actions .btn-ghost {
    flex: 0 0 auto;
  }
  .page {
    padding-bottom: 108px;
  }
  .list-meta .sep {
    display: none;
  }
  .list-meta {
    gap: 6px 9px;
  }

  .filter-bar {
    padding: 10px;
    gap: 6px;
  }
  .filter-bar .search-inline {
    width: 100%;
  }
  .filter-spacer {
    display: none;
  }
  .table {
    min-width: 640px;
  }

  .login-wrap {
    grid-template-columns: 1fr;
  }
  .login-hero {
    display: none;
  }
  .login-panel {
    padding: 28px 22px;
    align-items: flex-start;
    padding-top: 12vh;
  }
  .login-users {
    max-height: none;
  }
}

@media (max-width: 380px) {
  .stat-grid {
    gap: 8px;
  }
  .stat-value {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------- 详情补充 */

.detail-head-card {
  padding: 20px 22px;
}

.detail-head-card .meta-grid {
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  margin-top: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: start;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.stack .card + .card,
.rail .card + .card {
  margin-top: 0;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  position: sticky;
  top: 74px;
}

.info-list {
  padding: 6px 18px 14px;
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 7px 0;
  font-size: 13px;
}

.info-row .k {
  width: 72px;
  flex: none;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.6;
}

.info-row .v {
  flex: 1;
  min-width: 0;
  color: var(--text);
  word-break: break-word;
  line-height: 1.6;
}

.round-block {
  padding: 14px 0;
  border-top: 1px dashed var(--line);
}
.round-block:first-child {
  padding-top: 0;
  border-top: none;
}

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

.round-badge {
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.log-list {
  padding: 4px 18px 14px;
  max-height: 420px;
  overflow-y: auto;
}

.log-row {
  display: flex;
  gap: 9px;
  padding: 8px 0;
  border-top: 1px dashed var(--line);
}
.log-row:first-child {
  border-top: none;
}

.log-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-4);
  margin-top: 6px;
  flex: none;
}

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

.log-text {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-2);
  word-break: break-word;
}
.log-text b {
  color: var(--text);
  font-weight: 500;
}

.log-meta {
  font-size: 11px;
  color: var(--text-4);
  margin-top: 2px;
}

.pick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  background: var(--surface);
}
.pick-row:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.pick-row input {
  accent-color: var(--brand);
}
.pick-row .nm {
  font-size: 13px;
  font-weight: 500;
  display: block;
}
.pick-row .dp {
  font-size: 11px;
  color: var(--text-3);
  display: block;
  margin-top: 1px;
}

.btn-spinner {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  display: inline-block;
  animation: spin 0.7s linear infinite;
  margin-right: 6px;
  vertical-align: -2px;
}

.btn-secondary .btn-spinner {
  border-color: rgba(31, 35, 41, 0.2);
  border-top-color: var(--text);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1080px) {
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .rail {
    position: static;
  }
}

/* ---------------------------------------------------------------- 管理后台 */

.switch-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
}

.switch-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.switch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}

@media (max-width: 860px) {
  .switch-grid {
    grid-template-columns: 1fr;
  }
}

/* 登录身份列表中的角色标签不要被纵向 flex 拉伸 */
.login-user .chip {
  align-self: flex-start;
  margin-top: 3px;
}

/* 日期区间作为一个整体换行，避免「至」与第二个日期被拆散 */
.filter-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

@media (max-width: 860px) {
  .filter-bar.expanded .filter-group {
    display: flex;
    width: 100%;
  }
  .filter-bar.expanded .filter-group .field-inline {
    flex: 1;
    min-width: 0;
  }
}

/* ---------------------------------------------------------------- 移动端补强 */

.mobile-only {
  display: none;
}

@media (max-width: 860px) {
  /* 分段导航可横向滑动，避免文字被挤成两行 */
  .seg {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .seg::-webkit-scrollbar {
    display: none;
  }
  .seg button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .mobile-only {
    display: block;
  }

  /* 新建/编辑任务的底部按钮：滚动时吸附在底部导航上方 */
  .form-actions {
    position: sticky;
    bottom: calc(56px + env(safe-area-inset-bottom));
    z-index: 18;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: saturate(180%) blur(10px);
    border-top: 1px solid var(--line);
    padding: 10px 0;
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .form-actions .btn {
    flex: 1;
  }

  /* 头部已有「+」，首页问候语旁不再重复放按钮 */
  .hello-actions {
    display: none;
  }
}

@media (max-width: 860px) {
  /* iOS 上输入框字号小于 16px 会在聚焦时自动放大页面，这里统一为 16px */
  .input,
  .textarea,
  .field-inline,
  .search-inline input,
  select.field-inline {
    font-size: 16px;
  }
  .search-inline input {
    height: 38px;
    border-radius: 19px;
  }
  .search-inline svg {
    top: 11px;
  }
  /* 弹窗按钮在手机上等宽，便于单手点击 */
  .modal-foot .btn {
    flex: 1;
  }
}

@media (max-width: 860px) {
  /* 触控目标不小于 44px（iOS/Android 可点区域建议） */
  .sticky-actions .btn,
  .form-actions .btn,
  .modal-foot .btn {
    height: 44px;
  }
  .sticky-actions .btn {
    height: 46px;
  }
}
