﻿/* ===== CSS 变量（与主系统保持一致）===== */
:root {
  --color-primary:          #A11616;
  --color-primary-light:    #C94841;
  --color-primary-dark:     #600B0B;
  --color-secondary:        #D6A34A;
  --color-secondary-light:  #F5D9A6;
  --color-secondary-dark:   #B3802D;
  --color-accent:           #059669;
  --color-warning:          #d97706;
  --color-danger:           #dc2626;
  --color-success:          #28a745;
  --color-info:             #2563eb;
  --color-text:             #1f2937;
  --color-text-secondary:   #6b7280;
  --color-border:           #e5e7eb;
  --color-surface:          #ffffff;
  --color-background:       #f8f9fa;
  --color-muted-bg:         #f3f4f6;

  --gradient-primary:       linear-gradient(135deg, #A11616 0%, #C94841 100%);
  --gradient-header:        linear-gradient(135deg, #A11616 0%, #991b1b 50%, #600B0B 100%);
  --gradient-primary-dark:  linear-gradient(135deg, #7f1111 0%, #A11616 100%);

  --font-family:            'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  --font-size-xs:           0.75rem;
  --font-size-sm:           0.875rem;
  --font-size-base:         1rem;
  --font-size-lg:           1.125rem;
  --font-size-xl:           1.25rem;

  --radius-sm:  0;
  --radius-md:  0;
  --radius-lg:  0;
  --radius-xl:  0;

  --shadow-sm:  0 1px 2px rgba(0,0,0,.05);
  --shadow-md:  0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);

  --z-modal-overlay: 1010;
  --z-modal-content: 1020;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: var(--font-family);
  font-size: 16px;
  color: var(--color-text);
  background: var(--color-background);
  line-height: 1.5;
}

/* ===== 预览页面专用布局 ===== */
.preview-header {
  background: var(--gradient-header);
  color: #fff;
  padding: 32px 40px 28px;
  box-shadow: 0 4px 20px rgba(161,22,22,.35);
  border-bottom: 3px solid rgba(255,255,255,.15);
}
.preview-header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}
.preview-header-emblem {
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  border: 2px solid rgba(255,255,255,.25);
  flex-shrink: 0;
}
.preview-header h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .5px;
}
.preview-header p {
  font-size: 13px;
  opacity: .8;
  margin-top: 4px;
}
.preview-badge {
  margin-left: auto;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius-md);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.preview-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.section {
  margin-bottom: 56px;
}
.section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 16px;
  background: var(--gradient-primary);
  border-radius: 2px;
  flex-shrink: 0;
}
.section-sub {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
  margin-top: -16px;
}

/* --- 按钮行 --- */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.btn-row + .btn-row { margin-top: 0; }

/* ======================================================
   ██████╗ ██╗   ██╗████████╗████████╗ ██████╗ ███╗   ██╗
   ██╔══██╗██║   ██║╚══██╔══╝╚══██╔══╝██╔═══██╗████╗  ██║
   ██████╔╝██║   ██║   ██║      ██║   ██║   ██║██╔██╗ ██║
   ██╔══██╗██║   ██║   ██║      ██║   ██║   ██║██║╚██╗██║
   ██████╔╝╚██████╔╝   ██║      ██║   ╚██████╔╝██║ ╚████║
   ╚═════╝  ╚═════╝    ╚═╝      ╚═╝    ╚═════╝ ╚═╝  ╚═══╝
   统一按钮体系
   ====================================================== */

/* --- 基础结构 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 20px;
  height: 38px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  outline: none;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
  transition: background .18s ease, color .18s ease,
              border-color .18s ease, box-shadow .18s ease,
              transform .15s ease, opacity .15s ease;
  line-height: 1;
  letter-spacing: .2px;
}

/* 无光泽扫过效果（纯色按钮无需此动效） */

/* --- 尺寸变体 --- */
.btn-xs { height: 28px; padding: 0 12px; font-size: 11px; border-radius: var(--radius-sm); gap: 5px; }
.btn-sm { height: 32px; padding: 0 14px; font-size: 12px; }
.btn-md { height: 38px; padding: 0 20px; font-size: var(--font-size-sm); }
.btn-lg { height: 46px; padding: 0 28px; font-size: var(--font-size-base); border-radius: var(--radius-lg); gap: 9px; }
.btn-xl { height: 54px; padding: 0 36px; font-size: var(--font-size-lg); border-radius: var(--radius-lg); gap: 10px; font-weight: 700; }

/* 图标按钮（正方形） */
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: var(--radius-md); }
.btn-icon.btn-sm { width: 32px; height: 32px; }
.btn-icon.btn-lg { width: 46px; height: 46px; border-radius: var(--radius-lg); }
.btn-icon.btn-circle { border-radius: 50%; }

/* 撑满宽度 */
.btn-block { width: 100%; }

/* --- 主色（党建红）--- */
.btn-primary {
  background: #A11616;
  color: #fff;
  border-color: #A11616;
}
.btn-primary:hover {
  background: #8a1212;
  border-color: #8a1212;
}
.btn-primary:active {
  background: #600B0B;
  border-color: #600B0B;
}

/* --- 次级（深红）--- */
.btn-secondary-color {
  background: #600B0B;
  color: #fff;
  border-color: #600B0B;
}
.btn-secondary-color:hover {
  background: #4e0909;
  border-color: #4e0909;
}
.btn-secondary-color:active { background: #3a0707; }

/* --- 线框（描边）--- */
.btn-outline-primary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline-primary:hover {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(161,22,22,.25);
  transform: translateY(-1px);
}
.btn-outline-primary:active { transform: translateY(0); }

.btn-outline-secondary {
  background: transparent;
  color: var(--color-secondary-dark);
  border-color: var(--color-secondary);
}
.btn-outline-secondary:hover {
  background: var(--color-secondary-light);
  transform: translateY(-1px);
}

/* --- 幽灵（中性）--- */
.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}
.btn-ghost:hover {
  background: var(--color-muted-bg);
  color: var(--color-text);
  border-color: #d1d5db;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:active { transform: translateY(0); }

/* --- 文字按钮 --- */
.btn-text {
  background: transparent;
  border-color: transparent;
  color: var(--color-primary);
  padding-left: 6px;
  padding-right: 6px;
}
.btn-text:hover { color: var(--color-primary-dark); background: rgba(161,22,22,.06); }

/* --- 状态色 --- */
.btn-success {
  background: #28a745;
  color: #fff;
  border-color: #28a745;
}
.btn-success:hover { background: #218838; border-color: #218838; }
.btn-success:active { background: #1a6e2e; }

.btn-warning {
  background: #d97706;
  color: #fff;
  border-color: #d97706;
}
.btn-warning:hover { background: #b45309; border-color: #b45309; }
.btn-warning:active { background: #92400e; }

.btn-danger {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
}
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }
.btn-danger:active { background: #991b1b; }

.btn-info {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.btn-info:hover { background: #1d4ed8; border-color: #1d4ed8; }
.btn-info:active { background: #1e40af; }

/* --- 禁用 --- */
.btn:disabled,
.btn[disabled],
.btn.disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
  box-shadow: none !important;
}

/* --- 加载态 --- */
.btn.loading {
  pointer-events: none;
  opacity: .8;
}
.btn.loading .btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin .65s linear infinite;
  flex-shrink: 0;
}
.btn-ghost.loading .btn-spinner,
.btn-outline-primary.loading .btn-spinner {
  border-color: rgba(161,22,22,.3);
  border-top-color: var(--color-primary);
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* --- 按钮组 --- */
.btn-group {
  display: inline-flex;
}
.btn-group .btn {
  border-radius: 0;
  margin: 0;
}
.btn-group .btn:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.btn-group .btn:last-child  { border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.btn-group .btn:not(:first-child) { border-left-color: rgba(255,255,255,.25); margin-left: -1px; }
.btn-group .btn-ghost:not(:first-child) { border-left-color: var(--color-border); }

/* 分隔线 */
.btn-divider {
  width: 1px;
  height: 24px;
  background: var(--color-border);
  display: inline-block;
  margin: 0 4px;
  vertical-align: middle;
}

/* ======================================================
   ███╗   ███╗ ██████╗ ██████╗  █████╗ ██╗
   ████╗ ████║██╔═══██╗██╔══██╗██╔══██╗██║
   ██╔████╔██║██║   ██║██║  ██║███████║██║
   ██║╚██╔╝██║██║   ██║██║  ██║██╔══██║██║
   ██║ ╚═╝ ██║╚██████╔╝██████╔╝██║  ██║███████╗
   ╚═╝     ╚═╝ ╚═════╝ ╚═════╝ ╚═╝  ╚═╝╚══════╝
   统一模态框体系
   ====================================================== */

/* --- 遮罩层 --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal-overlay);
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  pointer-events: none;
}
.modal-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.modal-overlay.show .modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* --- 模态框容器 --- */
.modal {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px rgba(0,0,0,.22), 0 4px 16px rgba(0,0,0,.1);
  width: 100%;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(.94) translateY(16px);
  opacity: 0;
  transition: transform .28s cubic-bezier(.34,1.56,.64,1), opacity .22s ease;
  position: relative;
}
/* modal::before removed — no left accent bar */

/* --- 尺寸变体 --- */
.modal-sm  { max-width: 420px; }
.modal-md  { max-width: 560px; }
.modal-lg  { max-width: 720px; }
.modal-xl  { max-width: 920px; }
.modal-full{ max-width: calc(100vw - 48px); }

/* --- 头部 --- */
.modal-header {
  background: var(--gradient-header);
  color: #fff;
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-shrink: 0;
  position: relative;
}
.modal-header-icon {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,.15);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
}
.modal-header-text { flex: 1; min-width: 0; }
.modal-header-text h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 3px;
  line-height: 1.3;
}
.modal-header-text p {
  font-size: 13px;
  opacity: .85;
  margin: 0;
  line-height: 1.4;
}
.modal-close {
  width: 34px;
  height: 34px;
  border: none;
  background: rgba(255,255,255,.15);
  color: #fff;
  cursor: pointer;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background .18s ease, transform .15s ease;
  flex-shrink: 0;
  margin-left: auto;
  align-self: flex-start;
}
.modal-close:hover {
  background: rgba(255,255,255,.28);
  transform: scale(1.08);
}

/* --- 主体 --- */
.modal-body {
  padding: 28px 28px 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  background: #fafbfc;
}
.modal-body:first-child { padding-top: 32px; }

/* 分组 */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 20px;
}
.form-group:last-child { margin-bottom: 0; }
.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 6px;
}
.form-label .required { color: var(--color-primary); font-size: 14px; line-height: 1; }
.form-label i { color: var(--color-text-secondary); font-size: 13px; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  color: var(--color-text);
  background: #fff;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
  line-height: 1.5;
}
.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(161,22,22,.1);
}
.form-control::placeholder { color: #9ca3af; }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%236b7280' d='M1.5 5.5L8 12l6.5-6.5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; padding-right: 36px; }

/* --- 警告/提示区 --- */
.modal-alert {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border: 1px solid;
}
.modal-alert-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.modal-alert-text { font-size: 14px; line-height: 1.55; }
.modal-alert-text strong { display: block; font-weight: 600; margin-bottom: 3px; }
.modal-alert.info    { background: #dbeafe; border-color: #93c5fd; color: #1e40af; }
.modal-alert.info .modal-alert-icon { color: #2563eb; }
.modal-alert.warning { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.modal-alert.warning .modal-alert-icon { color: #d97706; }
.modal-alert.danger  { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
.modal-alert.danger .modal-alert-icon { color: #dc2626; }
.modal-alert.success { background: #dcfce7; border-color: #86efac; color: #166534; }
.modal-alert.success .modal-alert-icon { color: #28a745; }

/* --- 步骤指示器 --- */
.modal-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
}
.modal-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  flex: 1;
}
.modal-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}
.modal-step.done:not(:last-child)::after { background: var(--color-primary); }
.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--color-border);
  color: var(--color-text-secondary);
  border: 2px solid var(--color-border);
  z-index: 1;
  transition: all .2s ease;
}
.modal-step.done .step-dot  { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.modal-step.active .step-dot{ background: #fff; border-color: var(--color-primary); color: var(--color-primary); }
.step-label { font-size: 11px; color: var(--color-text-secondary); white-space: nowrap; font-weight: 500; }
.modal-step.done .step-label, .modal-step.active .step-label { color: var(--color-primary); font-weight: 600; }

/* --- 底部操作区 --- */
.modal-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  flex-shrink: 0;
}
.modal-footer .footer-left { flex: 1; }
.modal-footer .footer-right { display: flex; gap: 10px; align-items: center; }

/* --- 分隔线 --- */
.modal-divider {
  height: 1px;
  background: var(--color-border);
  margin: 0 28px;
  flex-shrink: 0;
}

/* ===== 状态徽章（用于预览场景） ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3px;
}
.badge-primary { background: rgba(161,22,22,.1); color: var(--color-primary); border: 1px solid rgba(161,22,22,.2); }
.badge-success { background: rgba(40,167,69,.1); color: #166534; border: 1px solid rgba(40,167,69,.2); }
.badge-warning { background: rgba(217,119,6,.1); color: #92400e; border: 1px solid rgba(217,119,6,.2); }
.badge-danger  { background: rgba(220,38,38,.1); color: #991b1b; border: 1px solid rgba(220,38,38,.2); }

/* ===== 预览框 ===== */
.demo-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 16px;
}
.demo-box-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--color-border);
}
.demo-dark {
  background: #1f2937;
  border-color: #374151;
}
.demo-dark .demo-box-label { color: #9ca3af; border-bottom-color: #374151; }

/* ===== 行内显示模态预览 ===== */
.modal-preview {
  position: relative;
  display: block;
  /* 在预览页中静态展示，无遮罩 */
}
.modal-preview .modal-overlay {
  position: relative;
  opacity: 1;
  visibility: visible;
  background: none;
  backdrop-filter: none;
  padding: 0;
  display: block;
}
.modal-preview .modal {
  position: relative;
  transform: none;
  opacity: 1;
  max-height: none;
  box-shadow: var(--shadow-lg);
}

/* ===== 色板 ===== */
.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.color-chip {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}
.color-chip-swatch {
  height: 56px;
}
.color-chip-info {
  padding: 8px 10px;
  background: #fff;
}
.color-chip-name  { font-size: 12px; font-weight: 600; color: var(--color-text); }
.color-chip-value { font-size: 11px; color: var(--color-text-secondary); font-family: 'Courier New', monospace; }

/* ===== 规范说明卡 ===== */
.spec-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.spec-card-header {
  background: var(--gradient-primary);
  color: #fff;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.spec-card-body {
  padding: 20px;
}
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.spec-table th {
  text-align: left;
  padding: 6px 12px;
  background: var(--color-muted-bg);
  font-weight: 600;
  color: var(--color-text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid var(--color-border);
}
.spec-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f3f4f6;
  color: var(--color-text);
  vertical-align: middle;
}
.spec-table tr:last-child td { border-bottom: none; }
.spec-table code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: var(--color-primary-dark);
}

/* ======================================================
   ████████╗ █████╗ ██████╗ ██╗     ███████╗
      ██║   ██╔══██╗██╔══██╗██║     ██╔════╝
      ██║   ███████║██████╔╝██║     █████╗
      ██║   ██╔══██║██╔══██╗██║     ██╔══╝
      ██║   ██║  ██║██████╔╝███████╗███████╗
      ╚═╝   ╚═╝  ╚═╝╚═════╝ ╚══════╝╚══════╝
   统一数据表格体系
   ====================================================== */

/* --- 滚动容器 --- */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

/* --- 基础结构 --- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
  background: var(--color-surface);
  min-width: 560px;
}

/* --- 表头 --- */
.table thead tr {
  background: var(--gradient-header);
}
.table thead th {
  padding: 13px 16px;
  color: rgba(255,255,255,.95);
  font-weight: 600;
  font-size: 12px;
  text-align: left;
  letter-spacing: .4px;
  white-space: nowrap;
  border: none;
  position: relative;
  user-select: none;
}
.table thead th::after {
  content: '';
  position: absolute;
  right: 0; top: 20%; bottom: 20%;
  width: 1px;
  background: rgba(255,255,255,.18);
}
.table thead th:last-child::after { display: none; }
.table thead th.th-center { text-align: center; }
.table thead th.th-right  { text-align: right; }

/* 排序指示 */
.table thead th.sortable { cursor: pointer; }
.table thead th.sortable:hover { background: rgba(255,255,255,.08); }
.sort-arrows {
  display: inline-flex;
  flex-direction: column;
  margin-left: 5px;
  opacity: .45;
  gap: 1px;
  vertical-align: middle;
  line-height: 1;
}
.sort-arrows i { font-size: 8px; display: block; }
.table thead th.sort-asc  .sort-arrows,
.table thead th.sort-desc .sort-arrows { opacity: 1; }
.table thead th.sort-asc  .fa-sort-up   { color: var(--color-secondary-light); }
.table thead th.sort-desc .fa-sort-down { color: var(--color-secondary-light); }

/* --- 数据行 --- */
.table tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: background .14s ease;
}
.table tbody tr:last-child { border-bottom: none; }
.table tbody td {
  padding: 12px 16px;
  color: var(--color-text);
  vertical-align: middle;
  line-height: 1.5;
}
.table tbody td.td-center { text-align: center; }
.table tbody td.td-right  { text-align: right; }
.table tbody td.td-muted  { color: var(--color-text-secondary); font-size: 12px; }
.table tbody td.td-mono   { font-family: 'Courier New', monospace; font-size: 12px; }
.table tbody td code {
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 11px;
  font-family: 'Courier New', monospace;
  color: var(--color-primary-dark);
}

/* --- 斑马纹 --- */
.table-striped tbody tr:nth-child(even) {
  background: #fafbfc;
}
.table-striped tbody tr:nth-child(even):hover { background: rgba(161,22,22,.05); }

/* --- 悬停高亮 --- */
.table-hover tbody tr:hover {
  background: rgba(161,22,22,.045);
}

/* --- 尺寸变体 --- */
.table-sm thead th,
.table-sm tbody td {
  padding: 8px 12px;
  font-size: 12px;
}
.table-lg thead th,
.table-lg tbody td {
  padding: 16px 20px;
  font-size: var(--font-size-base);
}

/* --- 行状态 --- */
.table tbody tr.row-success { background: rgba(40,167,69,.06); }
.table tbody tr.row-success:hover { background: rgba(40,167,69,.10); }
.table tbody tr.row-warning { background: rgba(217,119,6,.065); }
.table tbody tr.row-warning:hover { background: rgba(217,119,6,.11); }
.table tbody tr.row-danger  { background: rgba(220,38,38,.055); }
.table tbody tr.row-danger:hover  { background: rgba(220,38,38,.10); }
.table tbody tr.row-info    { background: rgba(37,99,235,.05); }
.table tbody tr.row-info:hover    { background: rgba(37,99,235,.09); }

/* 左侧状态色条 */
.table tbody tr.row-success td:first-child { border-left: 3px solid var(--color-success); }
.table tbody tr.row-warning td:first-child { border-left: 3px solid var(--color-warning); }
.table tbody tr.row-danger  td:first-child { border-left: 3px solid var(--color-danger); }
.table tbody tr.row-info    td:first-child { border-left: 3px solid var(--color-info); }

/* --- 序号列 --- */
.table .col-index {
  width: 52px;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 500;
}
/* --- 勾选列 --- */
.table .col-check {
  width: 44px;
  text-align: center;
}
.table .col-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* --- 操作列 --- */
.table .col-action {
  width: 160px;
  text-align: center;
  white-space: nowrap;
}
.table .col-action .btn { margin: 0 2px; }

/* --- 空数据占位 --- */
.table-empty {
  text-align: center;
  padding: 52px 0;
  color: var(--color-text-secondary);
  font-size: 14px;
}
.table-empty i {
  font-size: 36px;
  display: block;
  margin-bottom: 14px;
  opacity: .3;
}

/* --- 表格顶部工具栏 --- */
.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  background: #fff;
  gap: 12px;
  flex-wrap: wrap;
}
.table-header-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.table-header-title i { color: var(--color-primary); }
.table-header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.table-search {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  overflow: hidden;
  height: 32px;
}
.table-search i {
  padding: 0 10px;
  color: var(--color-text-secondary);
  font-size: 13px;
}
.table-search input {
  border: none;
  outline: none;
  font-size: 13px;
  font-family: var(--font-family);
  color: var(--color-text);
  width: 160px;
  padding: 0 8px 0 0;
  background: transparent;
}
.table-search input::placeholder { color: #9ca3af; }
.table-search:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(161,22,22,.1); }

/* --- 底部工具栏（分页）--- */
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--color-border);
  background: #fff;
  font-size: 13px;
  color: var(--color-text-secondary);
  flex-wrap: wrap;
  gap: 10px;
}
.table-footer-info { font-size: 13px; }
.table-pagination { display: flex; gap: 4px; align-items: center; }
.page-btn {
  height: 30px;
  min-width: 30px;
  padding: 0 8px;
  border: 1.5px solid var(--color-border);
  background: #fff;
  color: var(--color-text);
  font-size: 12px;
  font-family: var(--font-family);
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .18s ease;
  line-height: 1;
}
.page-btn:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.page-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  font-weight: 600;
}
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ===== 动效演示 ===== */
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(161,22,22,.4); }
  70%  { box-shadow: 0 0 0 10px rgba(161,22,22,0); }
  100% { box-shadow: 0 0 0 0 rgba(161,22,22,0); }
}
.btn-pulse { animation: pulse-ring 2s ease infinite; }

/* ===== 网格辅助 ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .preview-header { padding: 24px 20px; }
  .preview-body { padding: 24px 16px 60px; }
  .btn-row { gap: 8px; }
}

/* ======================================================
   ████████╗██╗████████╗██╗     ███████╗███████╗
      ██║   ██║╚══██╔══╝██║     ██╔════╝██╔════╝
      ██║   ██║   ██║   ██║     █████╗  ███████╗
      ██║   ██║   ██║   ██║     ██╔══╝  ╚════██║
      ██║   ██║   ██║   ███████╗███████╗███████║
      ╚═╝   ╚═╝   ╚═╝   ╚══════╝╚══════╝╚══════╝
   系统标题 & 说明文字体系（page-shell / page-hero）
   ====================================================== */

/* --- page-shell 页面容器 --- */
.page-shell {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* --- page-hero：页面顶部英雄区 --- */
.page-hero {
  padding: 28px 32px 24px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

/* 主色版本（党建红）*/
.page-hero--primary {
  background: var(--gradient-header);
  border-bottom: none;
  box-shadow: 0 4px 16px rgba(161, 22, 22, .2);
}
.page-hero--primary .page-title {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.page-hero--primary .page-subtitle {
  color: rgba(255, 255, 255, .82);
}
.page-hero--primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    rgba(255,255,255,.015) 0px,
    rgba(255,255,255,.015) 1px,
    transparent 1px,
    transparent 8px
  );
  pointer-events: none;
}

/* 浅色版本 */
.page-hero--light {
  background: var(--color-muted-bg);
  border-bottom: 2px solid var(--color-primary);
}
.page-hero--light .page-title {
  color: var(--color-primary-dark);
}

/* --- page-title：一级标题 --- */
.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  letter-spacing: .3px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.page-title i,
.page-title .fa,
.page-title .fas,
.page-title .far {
  font-size: 18px;
  opacity: .85;
  flex-shrink: 0;
}

/* --- page-subtitle：标题下方说明文字 --- */
.page-subtitle {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.6;
  max-width: 680px;
}

/* --- 页面标题行（带操作按钮）--- */
.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 24px;
}
.page-header-row .page-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.page-header-row .page-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* --- section-header：卡片/区块内标题 --- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.section-header-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* --- section-title（区块内 h2/h3）--- */
.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: .2px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::before {
  content: '';
  display: block;
  width: 3px;
  height: 14px;
  background: var(--gradient-primary);
  border-radius: 2px;
  flex-shrink: 0;
}
.section-title i {
  color: var(--color-primary);
  font-size: 13px;
}

/* --- section-desc：区块说明文字 --- */
.section-desc {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* --- module-title：模块/卡片标题（更小级别）--- */
.module-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: .1px;
  margin: 0 0 8px 0;
}

/* --- card-header-band：卡片顶部深色带标题 --- */
.card-header-band {
  background: var(--gradient-primary);
  color: #fff;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: .3px;
}
.card-header-band i { opacity: .85; }

/* --- breadcrumb：面包屑导航标题补充 --- */
.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}
.page-breadcrumb-sep {
  opacity: .5;
  font-size: 10px;
}
.page-breadcrumb a,
.page-breadcrumb .bc-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  cursor: pointer;
}
.page-breadcrumb a:hover,
.page-breadcrumb .bc-link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}
.page-breadcrumb .bc-current {
  color: var(--color-text);
  font-weight: 500;
}

/* --- 空状态标题/描述 --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  gap: 10px;
}
.empty-state-icon {
  font-size: 36px;
  color: var(--color-text-secondary);
  opacity: .45;
  line-height: 1;
}
.empty-state-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}
.empty-state-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: 0;
  max-width: 320px;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .page-hero { padding: 20px 16px 18px; }
  .page-title { font-size: 17px; }
  .page-header-row { flex-direction: column; align-items: flex-start; }
  .page-header-row .page-header-right { width: 100%; justify-content: flex-end; }
}

/* ======================================================
   ███████╗██╗██╗  ████████╗███████╗██████╗
   ██╔════╝██║██║  ╚══██╔══╝██╔════╝██╔══██╗
   █████╗  ██║██║     ██║   █████╗  ██████╔╝
   ██╔══╝  ██║██║     ██║   ██╔══╝  ██╔══██╗
   ██║     ██║███████╗██║   ███████╗██║  ██║
   ╚═╝     ╚═╝╚══════╝╚═╝   ╚══════╝╚═╝  ╚═╝
   筛选功能组件体系
   ====================================================== */

/* -------------------------------------------------------
   一、filter-bar：顶部横排筛选条
   用法：放在列表/表格上方，一行内联展示搜索框 + 下拉 + 操作按钮
   ------------------------------------------------------- */
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-bottom: none;     /* 与下方表格无缝衔接 */
}
.filter-bar--standalone {
  border: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 12px;
}
.filter-bar--muted {
  background: var(--color-muted-bg);
  border-color: var(--color-border);
}

/* -------------------------------------------------------
   二、filter-row：多条件换行筛选行（card-body 内使用）
   ------------------------------------------------------- */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  margin-bottom: 16px;
}
.filter-row .form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 160px;
  flex: 1 1 160px;
  max-width: 260px;
}
.filter-row .form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  white-space: nowrap;
}
.filter-row-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-bottom: 1px;   /* 与 input 底部对齐 */
  flex-shrink: 0;
  margin-left: auto;
}

/* -------------------------------------------------------
   三、inline-row：单行紧凑筛选（select + 按钮 混排）
   ------------------------------------------------------- */
.inline-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.inline-row .form-input,
.inline-row select,
.inline-row input {
  flex: 1 1 180px;
  max-width: 260px;
}

/* -------------------------------------------------------
   四、search-panel：侧边栏固定筛选面板
   ------------------------------------------------------- */
.search-panel {
  width: 240px;
  flex-shrink: 0;
  align-self: flex-start;
  position: sticky;
  top: 16px;
}
.search-panel .form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}
.search-panel .form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
}
.archive-filter-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.archive-filter-actions .btn { flex: 1; }

/* -------------------------------------------------------
   五、search-input-wrap：带图标的搜索输入框
   ------------------------------------------------------- */
.search-input-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.search-input-wrap .search-icon {
  position: absolute;
  left: 10px;
  color: var(--color-text-secondary);
  font-size: 13px;
  pointer-events: none;
  z-index: 1;
}
.search-input-wrap .search-clear {
  position: absolute;
  right: 8px;
  color: var(--color-text-secondary);
  font-size: 12px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 2px 4px;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}
.search-input-wrap .search-clear:hover {
  color: var(--color-text);
  background: var(--color-muted-bg);
}
.search-input-wrap .form-input,
.search-input-wrap input {
  padding-left: 30px;
  padding-right: 28px;
}

/* -------------------------------------------------------
   六、filter-tag / filter-chip：已选条件标签
   ------------------------------------------------------- */
.filter-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 16px;
  background: #fef9f0;
  border: 1px solid #f5d9a6;
  border-top: none;
  font-size: 12px;
}
.filter-tags-label {
  color: var(--color-text-secondary);
  font-weight: 600;
  flex-shrink: 0;
}
.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 10px;
  background: var(--color-secondary-light);
  border: 1px solid var(--color-secondary);
  border-radius: var(--radius-sm);
  color: var(--color-secondary-dark);
  font-size: 12px;
  font-weight: 500;
  cursor: default;
  user-select: none;
  transition: background .15s;
}
.filter-tag:hover { background: #edc97a; }
.filter-tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0,0,0,.12);
  cursor: pointer;
  font-size: 9px;
  line-height: 1;
  flex-shrink: 0;
  transition: background .15s;
}
.filter-tag-remove:hover { background: rgba(0,0,0,.25); }
.filter-tags-clear {
  margin-left: auto;
  color: var(--color-primary);
  cursor: pointer;
  text-decoration: underline;
  font-size: 12px;
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-family);
}
.filter-tags-clear:hover { color: var(--color-primary-dark); }

/* -------------------------------------------------------
   七、quick-filter：快捷分类筛选按钮组（全部 / 草稿 / 进行中…）
   ------------------------------------------------------- */
.quick-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.quick-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-family);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all .16s ease;
  white-space: nowrap;
  user-select: none;
  line-height: 1;
}
.quick-filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(161, 22, 22, .04);
}
.quick-filter-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  font-weight: 600;
}
.quick-filter-btn .qf-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 16px;
  padding: 0 4px;
  background: rgba(255,255,255,.25);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
.quick-filter-btn:not(.active) .qf-count {
  background: var(--color-muted-bg);
  color: var(--color-text-secondary);
}

/* -------------------------------------------------------
   八、filter-panel：可展开/收起高级筛选面板
   ------------------------------------------------------- */
.filter-panel {
  background: var(--color-muted-bg);
  border: 1px solid var(--color-border);
  border-top: 2px solid var(--color-primary);
  overflow: hidden;
  transition: max-height .25s ease, opacity .2s ease;
}
.filter-panel.collapsed {
  max-height: 0;
  opacity: 0;
  border-width: 0;
}
.filter-panel-inner {
  padding: 16px 20px 20px;
}
.filter-panel-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-panel-title::before {
  content: '';
  display: block;
  width: 3px;
  height: 12px;
  background: var(--gradient-primary);
  border-radius: 2px;
}
.filter-panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px 20px;
}
.filter-panel-grid .form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.filter-panel-grid .form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
}
.filter-panel-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}
/* 触发按钮带"高级筛选"状态指示 */
.filter-toggle-btn.has-filter {
  border-color: var(--color-secondary);
  color: var(--color-secondary-dark);
  background: var(--color-secondary-light);
}
.filter-toggle-btn.has-filter::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-secondary-dark);
  margin-left: 4px;
  flex-shrink: 0;
}

/* -------------------------------------------------------
   九、date-range：日期区间选择行
   ------------------------------------------------------- */
.date-range {
  display: flex;
  align-items: center;
  gap: 6px;
}
.date-range .form-input,
.date-range input[type="date"],
.date-range input[type="month"] {
  flex: 1;
  min-width: 0;
}
.date-range-sep {
  color: var(--color-text-secondary);
  font-size: 12px;
  flex-shrink: 0;
  padding: 0 2px;
}

/* -------------------------------------------------------
   十、form-input / form-control 基础（统一兜底）
   ------------------------------------------------------- */
.form-input,
.form-control {
  height: 36px;
  padding: 0 10px;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
  outline: none;
  width: 100%;
  transition: border-color .18s ease, box-shadow .18s ease;
  appearance: none;
  -webkit-appearance: none;
}
.form-input:hover,
.form-control:hover {
  border-color: #d1d5db;
}
.form-input:focus,
.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(161, 22, 22, .1);
}
.form-input::placeholder,
.form-control::placeholder {
  color: #b0b7c0;
}
select.form-input,
select.form-control {
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  cursor: pointer;
}
textarea.form-input,
textarea.form-control {
  height: auto;
  padding: 8px 10px;
  resize: vertical;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .filter-bar { gap: 8px; padding: 10px 12px; }
  .filter-row .form-group { min-width: 100%; max-width: 100%; }
  .filter-row-actions { width: 100%; justify-content: flex-end; margin-left: 0; }
  .search-panel { width: 100%; position: static; }
  .filter-panel-grid { grid-template-columns: 1fr; }
  .quick-filter { gap: 4px; }
}



/* ======================================================
   教学管理系统预览专用扩展样式
   基于 sysmod.html 的 token / button / modal / table / filter / title 体系
   ====================================================== */
:root {
  --sidebar-width: 248px;
  --topbar-height: 64px;
}
body { background: #f6f7f9; }
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  background: var(--color-background);
}
.app-sidebar {
  background: #fff;
  border-right: 1px solid var(--color-border);
  min-height: 100vh;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
}
.app-brand {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  background: var(--gradient-header);
  color: #fff;
  box-shadow: 0 4px 18px rgba(161,22,22,.25);
}
.app-brand-icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.app-brand-title { font-size: 16px; font-weight: 700; letter-spacing: .5px; }
.app-brand-sub { font-size: 11px; opacity: .82; margin-top: 2px; }
.app-menu { padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; }
.app-menu-title {
  font-size: 11px;
  color: var(--color-text-secondary);
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 12px 10px 6px;
  text-transform: uppercase;
}
.app-menu-item {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-text-secondary);
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all .18s ease;
}
.app-menu-item i { width: 18px; text-align: center; color: var(--color-primary); opacity: .8; }
.app-menu-item:hover { background: rgba(161,22,22,.04); border-color: rgba(161,22,22,.12); color: var(--color-primary-dark); }
.app-menu-item.active { background: var(--gradient-primary); color: #fff; box-shadow: var(--shadow-sm); }
.app-menu-item.active i { color: #fff; opacity: 1; }
.app-sidebar-footer { margin-top: auto; padding: 14px 16px 18px; border-top: 1px solid var(--color-border); }
.app-user {
  display:flex; gap:10px; align-items:center;
  padding:10px; background: var(--color-muted-bg); border:1px solid var(--color-border);
}
.app-avatar { width:34px; height:34px; border-radius:50%; background:var(--gradient-primary); color:#fff; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; }
.app-user-name { font-size:13px; font-weight:700; }
.app-user-role { font-size:11px; color:var(--color-text-secondary); }
.app-main { min-width: 0; display:flex; flex-direction:column; }
.app-topbar {
  height: var(--topbar-height);
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--color-border);
  display:flex; align-items:center; justify-content:space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 15;
  backdrop-filter: blur(10px);
}
.topbar-left { display:flex; align-items:center; gap:12px; color:var(--color-text-secondary); font-size:13px; }
.topbar-search { width: 320px; max-width: 42vw; }
.topbar-actions { display:flex; align-items:center; gap:8px; }
.app-content { padding: 24px; }
.module-page { display: none; animation: fadeIn .18s ease; }
.module-page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.metric-grid { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin: 18px 0; }
.metric-card {
  background:#fff; border:1px solid var(--color-border); box-shadow:var(--shadow-sm); padding:18px;
  position:relative; overflow:hidden;
}
.metric-card::before { content:''; position:absolute; left:0; top:0; width:4px; height:100%; background:var(--gradient-primary); }
.metric-card.info::before { background: var(--color-info); }
.metric-card.success::before { background: var(--color-success); }
.metric-card.warning::before { background: var(--color-warning); }
.metric-card .metric-top { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.metric-title { font-size:12px; color:var(--color-text-secondary); font-weight:600; }
.metric-icon { width:34px; height:34px; border-radius:50%; background:rgba(161,22,22,.08); color:var(--color-primary); display:flex; align-items:center; justify-content:center; }
.metric-value { font-size:25px; font-weight:800; margin-top:10px; color:var(--color-text); letter-spacing:.2px; }
.metric-desc { font-size:12px; color:var(--color-text-secondary); margin-top:6px; }
.panel-card { background:#fff; border:1px solid var(--color-border); box-shadow:var(--shadow-sm); margin-bottom:16px; }
.panel-card-body { padding:16px; }
.panel-card-header { padding:14px 16px; border-bottom:1px solid var(--color-border); display:flex; justify-content:space-between; align-items:center; gap:12px; }
.panel-title { font-size:14px; font-weight:700; display:flex; align-items:center; gap:8px; }
.panel-title i { color:var(--color-primary); }
.panel-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.workflow { display:grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap:10px; margin:12px 0 16px; }
.workflow-step { background:#fff; border:1px solid var(--color-border); padding:14px; min-height:94px; position:relative; }
.workflow-step::after { content:''; position:absolute; right:-10px; top:42px; width:10px; height:1px; background:var(--color-border); }
.workflow-step:last-child::after { display:none; }
.workflow-num { width:26px; height:26px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:var(--color-primary); color:#fff; font-size:12px; font-weight:700; margin-bottom:8px; }
.workflow-title { font-size:13px; font-weight:700; }
.workflow-desc { font-size:12px; color:var(--color-text-secondary); margin-top:4px; line-height:1.5; }
.score-card { display:grid; grid-template-columns: 1.2fr .8fr; gap:16px; }
.score-form-grid { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:12px; }
.weight-list { display:flex; flex-direction:column; gap:8px; }
.weight-row { display:flex; justify-content:space-between; align-items:center; padding:9px 12px; background:#f8fafc; border:1px solid var(--color-border); font-size:13px; }
.progress-line { height: 8px; background: #eef0f3; overflow:hidden; }
.progress-line span { display:block; height:100%; background:var(--gradient-primary); }
.file-drop {
  border:1.5px dashed #d1d5db;
  background:#fafafa;
  min-height:108px;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:8px; color:var(--color-text-secondary); text-align:center; padding:18px;
}
.file-drop i { font-size:26px; color:var(--color-primary); opacity:.78; }
.calendar-grid { display:grid; grid-template-columns: 88px repeat(5, 1fr); border:1px solid var(--color-border); background:#fff; overflow:hidden; }
.calendar-cell { min-height:76px; border-right:1px solid var(--color-border); border-bottom:1px solid var(--color-border); padding:10px; font-size:12px; }
.calendar-cell:nth-child(6n) { border-right: none; }
.calendar-head { background: var(--gradient-header); color:#fff; min-height:42px; font-weight:700; display:flex; align-items:center; justify-content:center; }
.calendar-time { background:#f8fafc; color:var(--color-text-secondary); font-weight:700; display:flex; align-items:center; justify-content:center; }
.lesson-card { background:#fff7ed; border-left:3px solid var(--color-warning); padding:8px; font-size:12px; line-height:1.5; }
.lesson-card strong { display:block; color:var(--color-text); }
.lesson-card.ai { background:#eff6ff; border-left-color:var(--color-info); }
.lesson-card.basic { background:#f0fdf4; border-left-color:var(--color-success); }
.teacher-list { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:12px; }
.teacher-card { border:1px solid var(--color-border); background:#fff; padding:14px; display:flex; gap:12px; align-items:flex-start; }
.teacher-photo { width:42px; height:42px; border-radius:50%; background:var(--gradient-primary); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; }
.teacher-info h4 { margin:0; font-size:14px; }
.teacher-info p { margin:4px 0 8px; font-size:12px; color:var(--color-text-secondary); }
.material-card-grid { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:14px; }
.material-card { background:#fff; border:1px solid var(--color-border); box-shadow:var(--shadow-sm); padding:16px; display:flex; flex-direction:column; min-height: 188px; }
.material-card-title { font-size:15px; font-weight:700; margin-bottom:8px; display:flex; align-items:center; gap:8px; }
.material-card-title i { color:var(--color-primary); }
.material-card-desc { color:var(--color-text-secondary); font-size:12px; line-height:1.6; flex:1; }
.material-meta { display:flex; justify-content:space-between; color:var(--color-text-secondary); font-size:12px; padding-top:12px; border-top:1px solid var(--color-border); margin-top:12px; }
.role-badge-row { display:flex; flex-wrap:wrap; gap:6px; }
.form-note { font-size:12px; color:var(--color-text-secondary); line-height:1.6; background:#fff7ed; border:1px solid #fed7aa; padding:10px 12px; }
.drawer-preview { display:grid; grid-template-columns: 1fr 320px; gap:16px; }
.side-detail { background:#fff; border:1px solid var(--color-border); box-shadow:var(--shadow-sm); }
.side-detail-header { background:var(--gradient-header); color:#fff; padding:14px 16px; font-weight:700; display:flex; align-items:center; gap:8px; }
.side-detail-body { padding:16px; display:flex; flex-direction:column; gap:12px; }
.detail-row { display:flex; justify-content:space-between; gap:10px; border-bottom:1px dashed var(--color-border); padding-bottom:8px; font-size:13px; }
.detail-row span:first-child { color:var(--color-text-secondary); }
.detail-row span:last-child { font-weight:600; text-align:right; }
.mobile-menu-btn { display:none; }
@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .workflow { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .workflow-step::after { display:none; }
  .score-card, .drawer-preview { grid-template-columns: 1fr; }
  .teacher-list, .material-card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { position:fixed; inset:0 auto 0 0; width:var(--sidebar-width); transform:translateX(-105%); transition:transform .22s ease; box-shadow:var(--shadow-lg); }
  .app-sidebar.open { transform:translateX(0); }
  .mobile-menu-btn { display:inline-flex; }
  .app-content { padding:16px; }
  .topbar-search { display:none; }
  .score-form-grid, .metric-grid, .teacher-list, .material-card-grid { grid-template-columns:1fr; }
  .calendar-grid { grid-template-columns: 72px repeat(5, 180px); overflow-x:auto; }
}