:root {
  /* 字体 */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "SF Pro", Inter, system-ui, sans-serif;

  /* 主题色 - 现代企业蓝 */
  --primary: #0052D9;
  --primary-hover: #003FA6;
  --primary-light: #E6F0FF;

  /* 背景色 */
  --bg-page: #F5F7FA;
  --bg-card: #FFFFFF;

  /* 文字色 */
  --text-primary: #1F2937;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;

  /* 边框 */
  --border: #E5E7EB;
  --border-light: #F3F4F6;

  /* 状态色 */
  --status-high: #DC2626;
  --status-medium: #F59E0B;
  --status-low: #0052D9;
  --status-processing: #0052D9;
  --status-done: #059669;
  --status-closed: #6B7280;

  /* 圆角 */
  --radius: 8px;
  --radius-sm: 4px;

  /* 阴影 */
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);

  /* 列宽 */
  --col-task-no: 70px;
  --col-title: 240px;
  --col-device-type: 70px;
  --col-priority: 50px;
  --col-due-date: 70px;
  --col-status: 70px;
  --col-logs: 600px;
  --col-attachments: 85px;

  color: var(--text-primary);
  background-color: var(--bg-page);
}

body {
  margin: 0;
  line-height: 1.5;
  background-color: var(--bg-page);
}

.header {
  background: linear-gradient(135deg, var(--primary) 0%, #003FA6 100%);
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0, 82, 217, 0.15);
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.header-left h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.header-subtitle {
  margin: 0;
  font-size: 0.875rem;
  opacity: 0.9;
  font-weight: 400;
}

.nav {
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
  align-items: center;
}

.nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.1);
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.nav span {
  font-weight: 400;
}

.nav-user {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  margin-left: 0.5rem;
  padding-left: 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.user-info-clickable {
  cursor: pointer;
  transition: opacity 0.2s ease;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
}

.user-info-clickable:hover {
  background: rgba(255, 255, 255, 0.2);
}

.header-date {
  font-size: 0.8125rem;
  opacity: 0.9;
  font-weight: 400;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  margin-left: 0.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.25);
  font-size: 0.75rem;
  font-weight: 500;
}
  font-size: 0.75rem;
  background-color: rgba(251, 191, 36, 0.2);
  color: #92400e;
  border: 1px solid rgba(251, 191, 36, 0.7);
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 2rem;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-light);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

label {
  display: flex;
  flex-direction: column;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  gap: 0.5rem;
}

input,
select,
textarea {
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 82, 217, 0.1);
}

.full-width {
  grid-column: 1 / -1;
}

.hidden {
  display: none !important;
}

.form-vertical {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-card {
  max-width: 420px;
  margin: 3rem auto;
}

button {
  border: none;
  border-radius: var(--radius);
  padding: 0.625rem 1.25rem;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  background-color: var(--text-secondary);
  color: #fff;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

button.primary {
  background-color: var(--primary);
}

button.primary:hover {
  background-color: var(--primary-hover);
}

.task-grid {
  display: grid;
  gap: 1rem;
}

.table-wrapper {
  overflow-x: auto;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}

.task-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  table-layout: fixed;
}

.task-table th,
.task-table td {
  border: 1px solid #e2e8f0;
  padding: 0.6rem;
  vertical-align: top;
  text-align: center;
  word-wrap: break-word;
  word-break: break-all;
}

.task-table thead {
  background-color: var(--bg-page);
  font-weight: 600;
}

.task-table tbody tr:nth-child(odd) {
  background-color: var(--bg-card);
}

.task-table tbody tr:hover {
  background-color: var(--primary-light);
}

.task-table tbody tr.row-critical {
  background-color: #FEF2F2;
}

.task-table tbody tr.row-critical:hover {
  background-color: #FEE2E2;
}

.task-table tbody tr.row-done {
  background-color: var(--border-light);
  opacity: 0.7;
}

.task-table tbody tr.row-done:hover {
  background-color: var(--border);
}
/* 列宽统一通过 colgroup 控制，值来自顶部 CSS 变量 */
.task-table col.col-task-no {
  width: var(--col-task-no);
}
.task-table col.col-title {
  width: var(--col-title);
}
.task-table col.col-device-type {
  width: var(--col-device-type);
}
.task-table col.col-priority {
  width: var(--col-priority);
}
.task-table col.col-date {
  width: var(--col-due-date);
}
.task-table col.col-status {
  width: var(--col-status);
}
.task-table col.col-logs {
  width: var(--col-logs);
}
.task-table col.col-attachments {
  width: var(--col-attachments);
}

/* 单元格自己的行为，仅处理对齐和文本，不再设置 width */
.cell-task-no {
  white-space: nowrap;
}

.task-edit-btn {
  display: none;
  margin-top: 0.25rem;
  margin-left: 0;
  padding: 0.1rem 0.4rem;
  font-size: 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.02);
  color: #475569;
}

td.cell-task-no:hover .task-edit-btn {
  display: inline-flex;
}

.task-no-content {
  display: flex;
  flex-direction: column;
  align-items: center; /* 课题编号及"编辑"按钮水平居中 */
}

.task-table td.cell-title {
  text-align: left;
}

.cell-priority,
.cell-status,
.cell-device-type {
  text-align: center;
  cursor: pointer;
}

/* .cell-status-done 使用默认字体颜色，无需特殊样式 */

.cell-logs {
  text-align: left;
}

.cell-attachments {
  text-align: left;
  font-size: 0.85rem;
}

.editable-category,
.editable-date {
  cursor: pointer;
}

.editable-category select {
  width: 100%;
  border-radius: 4px;
  padding: 0.3rem;
}

.log-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.log-list li {
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.4rem;
  padding: 0.2rem 0.4rem;
  padding-right: 80px; /* 为按钮预留空间 */
  border-radius: 4px;
  background-color: transparent; /* 具体颜色由下面的 nth-child 控制 */
  font-size: 0.8rem;
  position: relative;
}

.log-detail {
  white-space: normal;
  word-break: break-all;
  text-align: left;
  display: inline;
  flex: 1;
}

/* 让 log-detail 内的段落与作者名字同行 */
.log-detail p {
  display: inline;
  margin: 0;
}

.log-date {
  display: inline-block;
  min-width: 80px;
  text-align: center;
}

/* 高亮当日的日志，一眼就能看到今天的更新 */
.log-list li.log-today {
  background-color: #fef3c7 !important; /* 淡黄色背景，非常醒目 */
  border-left: 4px solid #f59e0b !important; /* 橙色左边框 */
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2) !important; /* 轻微阴影 */
  animation: fadeInTodayHighlight 0.8s ease-in;
  position: relative;
}

/* 当日日志添加一个小图标标识，放在行的最后（在编辑/删除按钮之前） */
.log-list li.log-today .log-detail::after {
  content: "New!";
  display: inline;
  font-size: 0.75rem;
  color: #dc2626; /* 红色 */
  opacity: 0.9;
  margin-left: 0.3rem;
  vertical-align: middle;
}

/* 当日日志的日期文字也高亮 */
.log-list li.log-today .log-date {
  color: #d97706;
  font-weight: 600;
}

/* 高亮最新的3条日志，方便观察最新更新的内容 */
.log-list li:nth-child(-n+3):not(.log-today) {
  background-color: #f0f9ff; /* 非常淡的蓝色背景 */
  border-left: 3px solid #3b82f6; /* 蓝色左边框 */
  animation: fadeInHighlight 0.6s ease-in;
}

/* 第一条（最新）日志使用更明显的样式 */
.log-list li:first-child:not(.log-today) {
  background-color: #eff6ff; /* 稍深一点的蓝色背景 */
  border-left: 4px solid #2563eb; /* 更粗的蓝色左边框 */
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1); /* 轻微阴影 */
}

/* 淡入高亮动画 */
@keyframes fadeInHighlight {
  from {
    opacity: 0;
    transform: translateX(-5px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 当日日志的淡入动画 */
@keyframes fadeInTodayHighlight {
  from {
    opacity: 0;
    transform: translateX(-8px) scale(0.98);
    background-color: #fff;
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
    background-color: #fef3c7;
  }
}

/* 处理记录操作按钮组 - flex 布局统一对齐 */
.log-list li {
  position: relative;
}

.log-list li .log-actions {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.log-list li:hover .log-actions {
  opacity: 1;
  visibility: visible;
}

.log-edit-btn {
  margin: 0;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.02);
  color: #475569;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1.4;
}

.log-delete-btn {
  margin: 0;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.75rem;
  border: 1px solid rgba(248, 113, 113, 0.8);
  background: rgba(248, 113, 113, 0.06);
  color: #b91c1c;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1.4;
}

.log-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.log-add-btn {
  align-self: flex-start;
  padding: 0.1rem 0.4rem;
  font-size: 0.75rem;
  line-height: 1;
  border-radius: 999px;
}

.log-form-table {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.log-form-table textarea {
  resize: vertical;
}

/* 附件相关样式 */
.attachments-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.attachments-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.attachment-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  background-color: #f3f4f6;
  font-size: 0.8rem;
  transition: background-color 0.2s;
}

.attachment-item:hover {
  background-color: #e5e7eb;
}

.attachment-link {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex: 1;
  text-decoration: none;
  color: #374151;
  overflow: hidden;
}

.attachment-link:hover {
  color: #3b82f6;
}

.attachment-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.attachment-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.attachment-delete-btn {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0;
  width: 1.2rem;
  height: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.attachment-delete-btn:hover {
  background-color: #fee2e2;
}

.attachment-add-btn {
  align-self: flex-start;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1.2;
  border-radius: 4px;
}

/* 附件按钮优化 */
.attachment-upload-btn {
  padding: 0.4rem 0.75rem !important;
  font-size: 0.8125rem !important;
  line-height: 1.4 !important;
  border-radius: 6px !important;
  background: #eff6ff !important;
  border: 1px solid #3b82f6 !important;
  color: #2563eb !important;
  font-weight: 500 !important;
  transition: all 0.2s ease;
  display: inline-flex !important;
  align-items: center;
  gap: 0.375rem;
}

.attachment-upload-btn:hover {
  background: #dbeafe !important;
  border-color: #2563eb !important;
  color: #1d4ed8 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.attachment-view-btn {
  padding: 0.4rem 0.75rem !important;
  font-size: 0.8125rem !important;
  line-height: 1.4 !important;
  border-radius: 6px !important;
  background: #f0fdf4 !important;
  border: 1px solid #22c55e !important;
  color: #16a34a !important;
  font-weight: 500 !important;
  transition: all 0.2s ease;
  display: inline-flex !important;
  align-items: center;
  gap: 0.375rem;
}

.attachment-view-btn:hover {
  background: #dcfce7 !important;
  border-color: #16a34a !important;
  color: #15803d !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(34, 197, 94, 0.2);
}

/* 附件网格布局 */
.attachments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.attachment-grid-item {
  display: flex;
  flex-direction: column;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.attachment-grid-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.attachment-thumbnail {
  position: relative;
  width: 100%;
  height: 120px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.attachment-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.attachment-thumbnail.attachment-video,
.attachment-thumbnail.attachment-file {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.attachment-video-icon,
.attachment-file-icon {
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.9);
}

.attachment-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e5e7eb;
}

.attachment-preview-btn,
.attachment-download-btn,
.attachment-delete-btn {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
  color: #374151;
  min-width: 2rem;
  height: 2rem;
}

.attachment-preview-btn:hover,
.attachment-download-btn:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
  transform: translateY(-1px);
}

.attachment-delete-btn {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

.attachment-delete-btn:hover {
  background: #fecaca;
  border-color: #f87171;
  color: #b91c1c;
  transform: translateY(-1px);
}

.attachment-info {
  padding: 0.5rem;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
}

.attachment-name {
  font-weight: 500;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 0.25rem;
}

.attachment-meta {
  font-size: 0.7rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.attachments-empty {
  padding: 3rem 2rem;
  text-align: center;
  color: #6b7280;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-text {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #374151;
}

.empty-hint {
  font-size: 0.85rem;
  color: #9ca3af;
}

.attachments-empty-redesign {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  min-height: 200px;
}

.empty-icon-redesign {
  font-size: 4rem;
  opacity: 0.3;
  margin-bottom: 1rem;
}

.empty-text-redesign {
  font-size: 1rem;
  color: #6b7280;
}

/* 现代化附件管理模态框样式 */
.attachments-modal-content-modern {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* 重新设计的附件管理样式 */
.attachments-modal-redesign {
  background: #fff;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 简洁头部 */
.attachments-header-redesign {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.attachments-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.attachments-title-redesign {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
}

.attachments-count-redesign {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: #3b82f6;
  color: #fff;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
}

.attachments-count-text {
  font-size: 0.875rem;
  color: #6b7280;
}

.attachments-close-redesign {
  min-width: auto;
  width: auto;
  height: 36px;
  padding: 0 12px;
  background: #fee2e2;
  border: 2px solid #fca5a5;
  color: #dc2626;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  flex-shrink: 0;
  margin-left: auto;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.attachments-close-redesign svg {
  width: 16px;
  height: 16px;
  stroke: #dc2626;
  stroke-width: 2.5;
  fill: none;
  flex-shrink: 0;
}

.attachments-close-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: #dc2626;
  line-height: 1;
}

/* 上传区域 */
.attachment-upload-area {
  margin-bottom: 1.5rem;
}

.upload-dropzone {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
  background: #f9fafb;
  cursor: pointer;
  transition: all 0.3s;
}

.upload-dropzone:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.upload-dropzone.drag-over {
  border-color: #3b82f6;
  background: #dbeafe;
  transform: scale(1.02);
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.upload-text {
  font-size: 1rem;
  color: #374151;
  margin-bottom: 0.5rem;
}

.upload-link {
  color: #3b82f6;
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
}

.upload-link:hover {
  color: #2563eb;
}

.upload-hint {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 0.5rem;
}

.upload-progress {
  margin-top: 1rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  transition: width 0.3s;
  width: 0%;
}

.progress-text {
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
}

/* 附件列表容器 */
.attachments-list-container {
  flex: 1;
  overflow-y: auto;
  min-height: 200px;
  max-height: 400px;
}

.attachments-container-redesign {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background: #f9fafb;
  min-height: 300px;
  width: 100%;
  position: relative;
}

.attachments-grid-redesign {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1rem;
  width: 100%;
}

/* 响应式：小屏幕自适应 */
@media (max-width: 1200px) {
  .attachments-grid-modern {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .attachments-grid-modern {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .attachments-grid-modern {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 网格视图样式 - 一行3个 */
.attachment-list-row {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s;
}

.attachment-list-row:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* 保留旧样式以兼容 */
.attachment-list-item {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s;
  cursor: default;
}

.attachment-list-item:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 网格预览区域 */
.attachment-list-preview {
  width: 100%;
  height: 180px;
  flex-shrink: 0;
  border-radius: 0;
  overflow: hidden;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}

.attachment-list-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.attachment-list-row:hover .attachment-list-preview img {
  transform: scale(1.05);
}

.attachment-list-preview-icon {
  background: #f3f4f6;
}

.attachment-list-icon {
  font-size: 3rem;
  color: #9ca3af;
}

/* 视频预览缩略图 */
.attachment-list-video-preview {
  position: relative;
  overflow: hidden;
}

.attachment-video-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  pointer-events: none;
}

.attachment-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
  transition: background 0.2s;
}

.attachment-list-row:hover .attachment-video-overlay {
  background: rgba(0, 0, 0, 0.2);
}

.attachment-video-play-icon {
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s;
}

.attachment-list-row:hover .attachment-video-play-icon {
  transform: scale(1.1);
}

/* 当视频缩略图加载后，显示视频并隐藏图标 */
.attachment-list-video-preview:has(video[style*="display: block"]) .attachment-list-icon {
  display: none;
}

.attachment-list-video-preview video[style*="display: block"] {
  display: block !important;
}

/* 网格详情区域 */
.attachment-list-details {
  flex: 1;
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.attachment-list-name-row {
  cursor: pointer;
}

.attachment-list-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

.attachment-list-name-row:hover .attachment-list-name {
  color: #3b82f6;
}

.attachment-list-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #6b7280;
  flex-wrap: wrap;
}

.attachment-list-separator {
  color: #d1d5db;
}

/* 网格操作按钮 */
.attachment-list-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid #f3f4f6;
  background: #fafbfc;
}

.attachment-list-btn {
  flex: 1;
  height: 32px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: #6b7280;
  pointer-events: auto;
  position: relative;
  z-index: 10;
}

.attachment-list-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #111827;
}

.attachment-list-btn-delete:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

/* 图片缩略图优化 - 确保图片清晰可见 */
.attachment-list-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.attachment-list-thumbnail::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.05) 100%);
  pointer-events: none;
}

.attachment-list-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.attachment-list-item:hover .attachment-list-thumbnail img {
  transform: scale(1.08);
}

.attachment-list-thumbnail.attachment-video,
.attachment-list-thumbnail.attachment-file {
  background: #f3f4f6;
}

.attachment-list-thumbnail .attachment-video-icon,
.attachment-list-thumbnail .attachment-file-icon {
  font-size: 2.5rem;
  color: #9ca3af;
}

/* 保留兼容性样式 */
.attachment-info-redesign {
  display: none;
}

/* 可点击的卡片样式 */
.attachment-item-image,
.attachment-item-video,
.attachment-item-file {
  cursor: pointer;
}

.attachments-modal-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
}

/* 移除底部，使用头部关闭按钮 */

/* 预览模态框样式 - 旧版本（保留兼容） */
.preview-modal-content {
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
}

.preview-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.preview-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.preview-modal-close:active {
  transform: scale(0.95);
}

.preview-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  z-index: 10;
}

.preview-control-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
  min-width: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-control-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.preview-control-btn:active {
  transform: scale(0.95);
}

.preview-content-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.preview-content-wrapper img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

.preview-content-wrapper:fullscreen {
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-content-wrapper:fullscreen img {
  max-height: 100vh;
}

/* 新预览模态框样式 */
.preview-modal-new {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.preview-modal-new[aria-hidden="false"] {
  display: flex;
  opacity: 1;
}

.preview-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
}

.preview-modal-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

/* 顶部工具栏 */
.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.preview-toolbar-left {
  flex: 1;
  min-width: 0;
}

.preview-filename {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.preview-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
}

.preview-toolbar-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
}

.preview-toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.preview-toolbar-btn:active {
  transform: translateY(0);
}

.preview-toolbar-btn .icon {
  font-size: 1rem;
  line-height: 1;
}

.preview-close-btn {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

.preview-close-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.6);
}

/* 预览内容区域 */
.preview-content-new {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 2rem;
  position: relative;
}

.preview-content-new img {
  max-width: 100%;
  max-height: calc(100vh - 180px);
  object-fit: contain;
  cursor: move;
  user-select: none;
  transition: transform 0.1s;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.preview-content-new video {
  max-width: 100%;
  max-height: calc(100vh - 180px);
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* 底部信息栏 */
.preview-footer {
  padding: 0.75rem 1.5rem;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.preview-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
}

.preview-separator {
  color: rgba(255, 255, 255, 0.3);
}

/* 全屏模式 */
.preview-content-new:fullscreen {
  background: rgba(0, 0, 0, 0.95);
  padding: 0;
}

.preview-content-new:fullscreen img {
  max-height: 100vh;
}

.task-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem;
  background: #fdfdfd;
}

.task-card header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: #475569;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
}

.badge.status {
  background-color: var(--primary-light);
  color: var(--primary);
}

.priority-1 {
  background-color: #FEE2E2;
  color: var(--status-high);
  border: 1px solid #FCA5A5;
}

.priority-0 {
  background-color: #D1FAE5;
  color: var(--status-done);
  border: 1px solid #6EE7B7;
}

.logs ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.logs li {
  display: flex;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #edf2f7;
}

.logs time {
  font-weight: 600;
}

.log-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
  margin-top: 0.8rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 0.8rem;
}

/* 顶部右侧浮动提示 */
.flash-list {
  list-style: none;
  padding: 0;
  margin: 0;
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 1100;
}

.flash {
  padding: 0.55rem 0.9rem;
  border-radius: 6px;
  margin-bottom: 0.4rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
  min-width: 180px;
}

.flash.success {
  background-color: #dcfce7;
  color: #14532d;
}

.flash.error {
  background-color: #fee2e2;
  color: #991b1b;
}

/* 闪消息淡出动画 */
.flash-list.flash-hide {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.muted {
  color: #94a3b8;
}

.stats-card {
  margin-bottom: 1rem;
  padding-top: 0.1rem;  /* 减少标题上方留白 */
  padding-bottom: 0.9rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.stat-item {
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
}

.stat-label {
  font-size: 0.8rem;
  color: #6b7280;
}

.stat-value {
  margin-top: 0.2rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
}

.stat-value.clickable-stat {
  cursor: pointer;
  transition: color 0.2s, text-decoration 0.2s;
}

.stat-value.clickable-stat:hover {
  color: #3b82f6;
  text-decoration: underline;
}

.page-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper input[type="text"] {
  padding-right: 2rem;
  min-width: 340px; /* 让提示文字完整显示 */
  width: 100%;
}

.search-clear-btn {
  position: absolute;
  right: 0.4rem;
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 1rem;
  padding: 0;
  cursor: pointer;
}

.search-clear-btn:hover {
  color: #4b5563;
}

.ghost {
  background-color: transparent;
  color: #1f2933;
  border: 1px solid #cbd5f5;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 1001;
  width: min(640px, 90vw);
}

.modal.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

#attachments-modal {
  width: min(1200px, 95vw);
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}

#attachments-modal.visible {
  transform: translate(-50%, -50%);
}

.modal-content {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  position: relative;
  border: 1px solid var(--border-light);
}

.modal-content h2 {
  margin: 0 0 1.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

#upload-success-modal {
  width: min(400px, 90vw);
}

#upload-success-modal .modal-content {
  padding: 2rem;
}

#upload-success-modal h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: var(--status-done);
}

#file-format-confirm-modal {
  width: min(450px, 90vw);
}

#file-format-confirm-modal .modal-content {
  padding: 2rem;
}

#file-format-confirm-modal h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: var(--text-primary);
}
  color: #dc2626;
}

#file-format-message {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #374151;
  margin: 0 0 1rem 0;
  white-space: pre-line;
  word-break: break-word;
}

/* 通用弹窗样式 */
#custom-alert-modal,
#custom-confirm-modal {
  width: min(450px, 90vw);
  z-index: 10002 !important;
}

#custom-alert-modal {
  z-index: 10002 !important;
}

/* 确保确认和提示弹窗的背景遮罩也在最上层 */
.modal-backdrop[data-active-modal="custom-confirm-modal"],
.modal-backdrop[data-active-modal="custom-alert-modal"] {
  z-index: 10001 !important;
}

#custom-alert-modal .modal-content,
#custom-confirm-modal .modal-content {
  padding: 2rem;
}

#custom-alert-title,
#custom-confirm-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
}

#custom-alert-message,
#custom-confirm-message {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #374151;
  margin: 0 0 1.5rem 0;
  white-space: pre-line;
  word-break: break-word;
}

#custom-alert-confirm,
#custom-confirm-ok,
#custom-confirm-cancel {
  min-width: 80px;
  padding: 0.5rem 1.5rem;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: transparent;
  color: #475569;
  font-size: 1.4rem;
  line-height: 1;
  border: none;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  grid-column: 1 / -1;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
}

.modal-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

/* 附件管理模态框背景 - 实体弹窗样式，减少背景遮罩 */
.modal-backdrop[data-active-modal="attachments-modal"] {
  background: rgba(15, 23, 42, 0.15) !important;
}

/* === 课题列表列宽优先级修正（放在样式文件靠后，覆盖前面规则） === */

/* 固定 6 个窄列：课题编号 / 课题类型 / 优先级 / 登记者 / 处理期限 / 处理分类，使用顶部 CSS 变量 */
.task-table td.cell-task-no {
  width: var(--col-task-no) !important;
}
.task-table td.cell-device-type {
  width: var(--col-device-type) !important;
}
.task-table td.cell-priority {
  width: var(--col-priority) !important;
}
.task-table td.cell-date {
  width: var(--col-due-date) !important;
}
.task-table td.cell-status {
  width: var(--col-status) !important;
}

/* 标题、处理记录使用剩余空间 */
.task-table td.cell-title {
  width: var(--col-title) !important;
}
.task-table td.cell-logs {
  width: var(--col-logs) !important;
}

/* CSV导入导出按钮样式 */
.csv-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.csv-import-form {
  margin: 0;
  display: inline-block;
}

.csv-export-btn,
.csv-import-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background-color: #ffffff;
  color: #374151;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  margin: 0;
  box-sizing: border-box;
  /* 重置 label 的默认样式 */
  flex-direction: row !important;
  font-family: inherit;
  line-height: 1.5;
}

/* 确保 label 元素不会继承 form-grid 的样式 */
.csv-import-btn {
  display: inline-flex !important;
  flex-direction: row !important;
  margin: 0 !important;
  font-size: 0.875rem !important;
  gap: 0.5rem !important;
}

.csv-export-btn:hover,
.csv-import-btn:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.csv-export-btn:active,
.csv-import-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.csv-export-btn span,
.csv-import-btn span {
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.csv-import-btn input[type="file"] {
  display: none;
}

/* Summernote 富文本编辑器样式 */
#detail-editor {
  margin-top: 0.25rem;
  width: 100%;
  box-sizing: border-box;
}

/* 处理记录折叠（页面加载时隐藏，JS通过内联样式覆盖控制） */
.log-hidden {
  display: none;
}

.log-expand-btn {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.log-expand-btn:hover {
  background: var(--primary);
  color: #fff;
}

/* 富文本内容显示样式 */
.log-detail {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.log-detail p {
  margin: 0.5rem 0;
}

.log-detail p:first-child {
  margin-top: 0;
}

.log-detail p:last-child {
  margin-bottom: 0;
}

/* 当最后一个段落后面有记录者名字时，强制在同一行显示 */
.log-detail p:last-child {
  display: inline;
  margin-bottom: 0;
}

.log-detail p:last-child + .log-author {
  margin-left: 0.3rem;
}

.log-detail ul,
.log-detail ol {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

.log-detail h1,
.log-detail h2,
.log-detail h3 {
  margin: 0.75rem 0 0.5rem 0;
  font-weight: 600;
}

.log-detail h1 {
  font-size: 1.5rem;
}

.log-detail h2 {
  font-size: 1.25rem;
}

.log-detail h3 {
  font-size: 1.125rem;
}

.log-detail a {
  color: #3b82f6;
  text-decoration: underline;
}

.log-detail a:hover {
  color: #2563eb;
}

.log-detail strong {
  font-weight: 600;
}

.log-detail em {
  font-style: italic;
}

.log-detail u {
  text-decoration: underline;
}

.log-detail s {
  text-decoration: line-through;
}

.log-author {
  display: inline;
  white-space: nowrap;
  margin-left: 0.3rem;
}

/* ===================== Admin Page Utilities ===================== */

/* Page header with icon and description */
.page-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.page-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-light) 0%, #dbeafe 100%);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.page-header-text h2 {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.page-header-text p {
  margin: 0.25rem 0 0 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Action bar for CSV import/export */
.action-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--bg-page);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}

/* Small button variant */
button.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  border-radius: 6px;
  font-weight: 500;
}

/* Danger button (red) */
button.btn-danger,
.btn-danger {
  background-color: #DC2626;
  color: #fff;
  border: none;
}

button.btn-danger:hover,
.btn-danger:hover {
  background-color: #B91C1C;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

/* Success button (green) */
button.btn-success,
.btn-success {
  background-color: #059669;
  color: #fff;
  border: none;
}

button.btn-success:hover,
.btn-success:hover {
  background-color: #047857;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
}

/* Table action buttons */
.table-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.625rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 0.3rem;
  white-space: nowrap;
  margin: 0 0.25rem;
}

.table-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.table-action-btn.edit {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

.table-action-btn.edit:hover {
  background: #dbeafe;
  box-shadow: 0 2px 4px rgba(0, 82, 217, 0.15);
}

.table-action-btn.danger {
  color: #DC2626;
  border-color: #DC2626;
  background: #FEF2F2;
}

.table-action-btn.danger:hover {
  background: #FEE2E2;
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.15);
}

/* Status tag badges */
.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
}

.status-tag.high {
  background-color: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

.status-tag.medium {
  background-color: #FEF3C7;
  color: #D97706;
  border: 1px solid #FDE68A;
}

.status-tag.low {
  background-color: #DBEAFE;
  color: #0052D9;
  border: 1px solid #BFDBFE;
}

/* Enhanced form section */
.form-section {
  padding: 1.25rem;
  background: var(--bg-page);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  margin-top: 1rem;
}

.form-section .form-grid {
  margin: 0;
}

/* Confirmation modal styling */
.confirm-modal {
  max-width: 480px;
  width: 90vw;
}

.confirm-modal .modal-content {
  padding: 2rem;
  text-align: center;
}

.confirm-modal .confirm-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.confirm-modal .confirm-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.75rem 0;
}

.confirm-modal .confirm-message {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 1.5rem 0;
}

.confirm-modal .confirm-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

/* Status indicator dot */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.status-indicator::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-indicator.active::before {
  background-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
}

.status-indicator.inactive::before {
  background-color: #9CA3AF;
}

.status-indicator.warning::before {
  background-color: #F59E0B;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

