/* ===== 那曲市司法局公法中心工作台 - 全局样式 ===== */

/* ---------- 变量 ---------- */
:root {
  --primary: #3a6ea5;
  --primary-dark: #2c5282;
  --primary-light: #5a8bc4;
  --sidebar-bg: #2c3e50;
  --sidebar-hover: #34495e;
  --sidebar-active: #3a6ea5;
  --bg: #f5f7fa;
  --bg-warm: #fdfbf7;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --text: #2d3748;
  --text-light: #718096;
  --text-muted: #a0aec0;
  --gold: #d4af37;
  --gold-light: #f0e68c;
  --danger: #e53e3e;
  --warning: #dd6b20;
  --info: #3182ce;
  --success: #38a169;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
}

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

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

/* ---------- 登录页 ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3a6ea5 0%, #5a8bc4 40%, #e8edf2 70%, #fdfbf7 100%);
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  top: -200px; right: -150px;
}
.login-page::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(212,175,55,0.1);
  bottom: -100px; left: -100px;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 420px;
  max-width: 92vw;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px 28px;
  border: 1px solid rgba(255,255,255,0.6);
}

.login-logo {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(58,110,165,0.4);
}
.login-logo svg { width: 38px; height: 38px; fill: #fff; }

.login-title {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 4px;
  letter-spacing: 1px;
}
.login-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 28px;
}

.login-field {
  margin-bottom: 18px;
  position: relative;
}
.login-field label {
  display: block;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 6px;
  font-weight: 500;
}
.login-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.login-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(58,110,165,0.12);
}
.login-field .toggle-pwd {
  position: absolute;
  right: 12px;
  top: 36px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 18px;
  user-select: none;
}
.login-field .toggle-pwd:hover { color: var(--primary); }

.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  font-size: 13px;
}
.login-checkbox {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; color: var(--text-light);
}
.login-checkbox input { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }
.login-forgot {
  color: var(--text-light);
  text-decoration: none;
  cursor: pointer;
}
.login-forgot:hover { color: var(--primary); }

.login-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 2px;
}
.login-btn:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(58,110,165,0.4); }
.login-btn:disabled { background: #a0aec0; cursor: not-allowed; box-shadow: none; }

.login-error {
  color: var(--danger);
  font-size: 13px;
  text-align: center;
  margin-bottom: 12px;
  min-height: 20px;
}
.login-security {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* 改密弹窗 */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}
.modal-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 32px;
  width: 380px;
  max-width: 92vw;
  box-shadow: var(--shadow-lg);
}
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--primary-dark); }
.modal-desc { font-size: 13px; color: var(--text-light); margin-bottom: 20px; }

/* ---------- 工作台布局 ---------- */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
  width: 230px;
  background: var(--sidebar-bg);
  color: #cbd5e0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s;
}
.sidebar-header {
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-header .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-header .logo-icon svg { width: 22px; height: 22px; fill: #fff; }
.sidebar-header .logo-text { font-size: 14px; font-weight: 700; color: #fff; line-height: 1.3; }

.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.sidebar-nav .nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: #cbd5e0;
  font-size: 14px;
  margin-bottom: 4px;
  transition: all 0.15s;
  text-decoration: none;
}
.sidebar-nav .nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-nav .nav-item.active { background: var(--sidebar-active); color: #fff; box-shadow: 0 2px 8px rgba(58,110,165,0.4); }
.sidebar-nav .nav-item .nav-icon { font-size: 18px; width: 22px; text-align: center; }

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: #718096;
}

/* 主内容区 */
.main-area {
  flex: 1;
  margin-left: 230px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.topbar {
  height: 60px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-size: 17px; font-weight: 700; color: var(--primary-dark); }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-user { font-size: 13px; color: var(--text-light); display: flex; align-items: center; gap: 6px; }
.topbar-user .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.btn-logout {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-light);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}
.btn-logout:hover { border-color: var(--danger); color: var(--danger); }

.content { padding: 24px; flex: 1; }
.page { display: none; }
.page.active { display: block; }

/* ---------- 通用组件 ---------- */
.btn {
  padding: 8px 18px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #c4a032; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.85; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 18px;
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between;
}

input[type="text"], input[type="password"], input[type="date"],
input[type="number"], input[type="search"], select, textarea {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(58,110,165,0.1); }
textarea { resize: vertical; min-height: 80px; }

/* ---------- 值班公示 ---------- */
.duty-toolbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.month-switch { display: flex; align-items: center; gap: 12px; }
.month-switch .arrow {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
}
.month-switch .arrow:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.month-label { font-size: 18px; font-weight: 700; color: var(--primary-dark); min-width: 130px; text-align: center; }

.duty-tables { display: grid; grid-template-columns: 1fr; gap: 18px; }
.duty-table-wrap { overflow-x: auto; }
.duty-table-wrap h4 {
  font-size: 14px; color: var(--primary-dark); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.duty-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 700px;
}
.duty-table th, .duty-table td {
  border: 1px solid var(--border);
  padding: 6px 8px;
  text-align: center;
  vertical-align: top;
}
.duty-table th {
  background: var(--bg);
  color: var(--text-light);
  font-weight: 600;
  font-size: 12px;
}
.duty-table td .cell-input {
  width: 100%;
  border: none;
  padding: 4px 6px;
  text-align: center;
  font-size: 13px;
  background: transparent;
}
.duty-table td .cell-input:focus { background: rgba(58,110,165,0.06); }
.duty-table td .add-row-btn {
  font-size: 18px; color: var(--primary); cursor: pointer;
  background: none; border: none; width: 100%; padding: 2px;
}
.duty-table td .add-row-btn:hover { color: var(--primary-dark); }
.duty-table td .remove-row { color: var(--danger); cursor: pointer; font-size: 14px; margin-left: 4px; }

.person-cell {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  cursor: pointer; padding: 4px;
  border-radius: 6px;
}
.person-cell:hover { background: rgba(58,110,165,0.06); }
.person-cell .pname { font-weight: 500; }
.person-cell .pphone { font-size: 11px; color: var(--text-muted); }

/* 公示预览 */
.preview-hint {
  background: #fef9e7;
  border: 1px solid var(--gold-light);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 13px;
  color: #92760c;
  margin-bottom: 16px;
}
.publish-week {
  margin-bottom: 24px;
  page-break-inside: avoid;
}
.publish-week h3 {
  text-align: center;
  font-size: 16px;
  color: var(--primary-dark);
  margin-bottom: 12px;
}
.publish-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 12px;
}
.publish-table th, .publish-table td {
  border: 1px solid #cbd5e0;
  padding: 8px 6px;
  text-align: center;
}
.publish-table th { background: var(--primary); color: #fff; font-weight: 600; }
.publish-table .role-row td { background: var(--bg); font-weight: 600; color: var(--primary-dark); text-align: left; padding-left: 12px; }
.publish-person { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.publish-person .avatar-sm {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary-light); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  overflow: hidden;
}
.publish-person .avatar-sm img { width: 100%; height: 100%; object-fit: cover; }
.publish-person .pname { font-size: 12px; }
.publish-person .pphone { font-size: 10px; color: var(--text-muted); }

/* 人员管理侧边栏 */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  display: none;
}
.drawer-overlay.show { display: block; }
.drawer {
  position: fixed;
  top: 0; right: -460px;
  width: 440px; max-width: 92vw;
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  z-index: 201;
  display: flex; flex-direction: column;
  transition: right 0.3s;
}
.drawer.show { right: 0; }
.drawer-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.drawer-header h3 { font-size: 17px; color: var(--primary-dark); }
.drawer-close { font-size: 24px; cursor: pointer; color: var(--text-muted); background: none; border: none; line-height: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.drawer-footer { padding: 14px 22px; border-top: 1px solid var(--border); }

.person-form .form-row { margin-bottom: 14px; }
.person-form .form-row label { display: block; font-size: 13px; color: var(--text-light); margin-bottom: 4px; }
.person-form .form-row input, .person-form .form-row select { width: 100%; }
.avatar-upload {
  width: 80px; height: 80px; border-radius: 50%;
  border: 2px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden;
  background: var(--bg);
}
.avatar-upload img { width: 100%; height: 100%; object-fit: cover; }
.avatar-upload .hint { font-size: 11px; color: var(--text-muted); text-align: center; }

.person-list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.person-list-item:hover { background: var(--bg); }
.person-list-item .pl-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary-light); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; overflow: hidden; flex-shrink: 0;
}
.person-list-item .pl-avatar img { width: 100%; height: 100%; object-fit: cover; }
.person-list-item .pl-info { flex: 1; }
.person-list-item .pl-name { font-weight: 600; font-size: 14px; }
.person-list-item .pl-meta { font-size: 12px; color: var(--text-muted); }
.person-list-item .pl-actions { display: flex; gap: 8px; }

/* ---------- 活动模块 ---------- */
.activity-layout { display: grid; grid-template-columns: 320px 1fr; gap: 18px; }
.activity-list-panel { display: flex; flex-direction: column; gap: 10px; }
.activity-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  position: relative;
}
.activity-card:hover { box-shadow: var(--shadow); }
.activity-card.active { border-color: var(--primary); }
.activity-card .ac-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; padding-right: 20px; }
.activity-card .ac-date { font-size: 12px; color: var(--text-muted); }
.activity-card .ac-meta { font-size: 12px; color: var(--text-light); margin-top: 6px; display: flex; gap: 10px; }
.activity-card .pin-btn {
  position: absolute; top: 10px; right: 10px;
  background: none; border: none; cursor: pointer; font-size: 16px;
  opacity: 0.5;
}
.activity-card .pin-btn.pinned { opacity: 1; }
.activity-card .badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 600;
}
.activity-card .badge.done { background: #c6f6d5; color: #22543d; }

.activity-detail { min-height: 400px; }
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.media-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg);
}
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; }
.media-item .media-del {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,0.6); color: #fff;
  border-radius: 50%; width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px; border: none;
}
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--primary); background: rgba(58,110,165,0.04); color: var(--primary); }
.upload-zone .uz-icon { font-size: 36px; margin-bottom: 8px; }

/* ---------- 法条查询 ---------- */
.laws-search-wrap { margin-bottom: 20px; }
.laws-search {
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.law-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.law-cat-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  border-top: 3px solid var(--primary);
}
.law-cat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-top-color: var(--gold);
}
.law-cat-card .lc-icon { font-size: 28px; margin-bottom: 8px; }
.law-cat-card .lc-name { font-weight: 600; font-size: 14px; color: var(--text); }
.law-cat-card .lc-count { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.law-list-item {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.law-list-item:hover { background: var(--bg); }
.law-list-item .ll-title { font-weight: 600; font-size: 15px; color: var(--primary-dark); }
.law-list-item .ll-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.law-list-item .ll-preview { font-size: 13px; color: var(--text-light); margin-top: 6px; }

.law-detail h2 { color: var(--primary-dark); margin-bottom: 8px; }
.law-detail .law-meta { color: var(--text-muted); font-size: 13px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.law-detail .law-body { font-size: 14px; line-height: 1.9; white-space: pre-wrap; }
.law-detail .law-body .highlight { background: var(--gold-light); padding: 0 2px; border-radius: 2px; }
.law-chapter { font-weight: 700; color: var(--primary-dark); margin: 16px 0 8px; font-size: 15px; }
.law-article { margin-bottom: 10px; }

.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-light); margin-bottom: 16px; }
.breadcrumb a { color: var(--primary); cursor: pointer; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--text-muted); }

/* ---------- 援助统计 ---------- */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  border-left: 4px solid var(--primary);
}
.stat-card .stat-label { font-size: 13px; color: var(--text-light); margin-bottom: 8px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--primary-dark); }
.stat-card .stat-unit { font-size: 14px; color: var(--text-muted); font-weight: 400; margin-left: 4px; }

.stats-table-wrap { overflow-x: auto; }
.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 800px;
}
.stats-table th, .stats-table td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: center;
}
.stats-table th { background: var(--primary); color: #fff; font-weight: 600; }
.stats-table td input {
  width: 60px;
  border: 1px solid transparent;
  text-align: center;
  padding: 4px;
  background: transparent;
}
.stats-table td input:focus { border-color: var(--primary); background: #fff; }
.stats-table tr.row-total { background: #ebf4ff; font-weight: 700; }
.stats-table tr.row-city { background: #fef9e7; font-weight: 600; }
.stats-table td.row-label { text-align: left; font-weight: 600; padding-left: 14px; }

.report-status {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 18px;
}
.status-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.status-chip.reported { background: #c6f6d5; color: #22543d; }
.status-chip.pending { background: #feebc8; color: #744210; }

/* ---------- 待办事项 ---------- */
.todo-add {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-bottom: 20px;
}
.todo-add input[type="text"] { flex: 1; min-width: 200px; }
.todo-list { display: flex; flex-direction: column; gap: 12px; }
.todo-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px 20px;
  border-left: 4px solid var(--info);
  transition: box-shadow 0.2s;
}
.todo-card:hover { box-shadow: var(--shadow); }
.todo-card.urgent-high { border-left-color: var(--danger); }
.todo-card.urgent-mid { border-left-color: var(--warning); }
.todo-card.urgent-low { border-left-color: var(--info); }
.todo-card.completed { opacity: 0.6; background: #f7fafc; }
.todo-card.archived { opacity: 0.5; }

.todo-head { display: flex; justify-content: space-between; align-items: start; margin-bottom: 10px; }
.todo-title { font-weight: 600; font-size: 15px; }
.todo-title .done-mark { color: var(--success); margin-right: 6px; }
.todo-badges { display: flex; gap: 8px; align-items: center; }
.tag {
  display: inline-block; padding: 2px 10px;
  border-radius: 10px; font-size: 12px; font-weight: 600;
}
.tag-high { background: #fed7d7; color: #9b2c2c; }
.tag-mid { background: #feebc8; color: #7b341e; }
.tag-low { background: #bee3f8; color: #2a4365; }
.todo-deadline { font-size: 12px; color: var(--text-muted); }

.progress-wrap { margin: 10px 0; }
.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 4px;
  transition: width 0.3s;
}
.progress-fill.complete { background: var(--success); }
.progress-info { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.todo-actions { display: flex; gap: 8px; margin-top: 10px; }

.timeline { margin-top: 16px; }
.timeline-item { padding: 10px 0 10px 20px; border-left: 2px solid var(--border); position: relative; }
.timeline-item::before {
  content: ''; position: absolute; left: -5px; top: 14px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--primary);
}
.timeline-item .ti-time { font-size: 12px; color: var(--text-muted); }
.timeline-item .ti-content { font-size: 13px; margin-top: 2px; }

/* ---------- 通用工具 ---------- */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}
.empty-state .es-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.text-center { text-align: center; }
.w-full { width: 100%; }

.toast {
  position: fixed;
  top: 80px; right: 24px;
  background: var(--text);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  font-size: 14px;
  animation: slideIn 0.3s;
  max-width: 360px;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warn { background: var(--warning); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* 模态框通用 */
.modal-content {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  width: 460px;
  max-width: 92vw;
  max-height: 86vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-content.large { width: 680px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-header h3 { font-size: 17px; color: var(--primary-dark); }
.modal-close { font-size: 22px; cursor: pointer; color: var(--text-muted); background: none; border: none; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ---------- 打印样式 ---------- */
@media print {
  .sidebar, .topbar, .duty-toolbar, .no-print { display: none !important; }
  .main-area { margin-left: 0 !important; }
  .content { padding: 0 !important; }
  body { background: #fff; }
  .publish-table { font-size: 11px; }
  .publish-week { page-break-inside: avoid; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .activity-layout { grid-template-columns: 1fr; }
  .menu-toggle { display: flex !important; }
}
.menu-toggle {
  display: none;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  background: none; border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; font-size: 18px;
}
