@charset "UTF-8";

/* CSS 变量定义 */
:root {
  --bg: #f8fafc;
  --bg-secondary: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --text-secondary: #334155;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #dbeafe;
  --primary-dark: #1e40af;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  --admin-panel-min-height: 900px;
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 72px;
  --header-height: 64px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.25);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition-fast: 0.15s ease;
  --transition: 0.2s ease;
  --transition-slow: 0.3s ease;
}

html.dark {
  --bg: #0f172a;
  --bg-secondary: #1e293b;
  --card: #1e293b;
  --text: #f8fafc;
  --text-secondary: #cbd5e1;
  --muted: #94a3b8;
  --border: #334155;
  --border-light: #1e293b;
  --primary-light: rgba(37, 99, 235, 0.15);
}

/* 基础样式 */
body {
  margin: 0;
  font-family: "Inter", "system-ui", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background-color var(--transition), color var(--transition);
}

html.dark body {
  background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
}

.container {
  width: min(1400px, 96vw);
  margin: 0 auto;
  padding: 40px 0;
}

body.login-mode .container {
  width: min(1120px, 94vw);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 0;
}

/* 状态栏 Toast */
.status-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  min-width: 300px;
  padding: 14px 24px;
  border-radius: 12px;
  background: #fff;
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-left: 5px solid var(--primary);
  font-weight: 500;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  opacity: 1;
}

.status-toast.hidden {
  top: -100px;
  opacity: 0;
  display: block !important;
}

.status-toast.error {
  border-left-color: var(--danger);
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}
.status-toast.success {
  border-left-color: var(--success);
  color: var(--success);
  background: rgba(34, 197, 94, 0.1);
}

/* 顶部 Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding: 0 10px;
}

.header-copy {
  min-width: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

body.login-mode .header {
  width: 100%;
  margin: 0 0 28px;
  padding: 0;
  justify-content: flex-start;
}

.session-status {
  position: relative;
  font-size: 14px;
  font-weight: 500;
}

.session-dropdown {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
  padding: 10px 12px 10px 10px;
  border-radius: 18px;
  border: 1px solid #dbeafe;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.session-dropdown:hover {
  box-shadow: 0 8px 24px -8px rgba(37, 99, 235, 0.25);
  border-color: var(--primary);
}

.session-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 32px -8px rgba(0, 0, 0, 0.15);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.2s ease;
  z-index: 100;
}

.session-dropdown:hover .session-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.session-menu-item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.session-menu-item:hover {
  background: var(--bg-secondary);
  color: var(--primary-dark);
}

.session-menu-danger {
  color: var(--danger);
}

.session-menu-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.session-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.session-avatar {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 8px 18px -10px rgba(37, 99, 235, 0.7);
  overflow: hidden;
}

.session-avatar svg {
  width: 100%;
  height: 100%;
}

.session-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.session-kicker {
  font-size: 12px;
  color: var(--muted);
}

#current-user {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.session-role {
  padding: 6px 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

/* 布局：侧边栏与主区 */
.admin-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
  min-height: var(--admin-panel-min-height);
  align-items: stretch;
}

/* 侧边栏 */
.admin-sidebar {
  position: sticky;
  top: 20px;
  min-height: var(--admin-panel-min-height);
  padding: 20px !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0;
  box-shadow: var(--shadow);
  transition: background-color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

html.dark .admin-sidebar {
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(12px);
  border-color: rgba(51, 65, 85, 0.5);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 4px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.sidebar-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
  transition: height var(--transition);
}

.sidebar-link:hover {
  background: var(--bg-secondary);
  color: var(--primary);
}

html.dark .sidebar-link:hover {
  background: rgba(37, 99, 235, 0.1);
}

.sidebar-link.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff !important;
  box-shadow: var(--shadow-glow);
}

.sidebar-link.active::before {
  height: 60%;
  background: #fff;
}

.admin-main {
  min-width: 0;
  min-height: var(--admin-panel-min-height);
}

/* 卡片基础样式 */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 30px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  transition: background-color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

html.dark .card {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(8px);
  border-color: rgba(51, 65, 85, 0.5);
}

.card-title {
  margin: 0 0 25px;
  font-size: 20px;
  font-weight: 700;
  border-left: 4px solid var(--primary);
  padding-left: 15px;
  color: var(--text);
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}
.card-header-flex .card-title { margin-bottom: 0; }

/* 概览卡片 */
.overview-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: calc(var(--admin-panel-min-height) - 24px);
  box-sizing: border-box;
  justify-content: flex-start;
}

.overview-copy {
  min-width: 0;
}

.user-mgmt-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}

.admin-summary-card {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 8px 18px -14px rgba(15, 23, 42, 0.24);
}

.admin-summary-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.admin-summary-value {
  margin-top: 10px;
  font-size: 26px;
  line-height: 1;
  font-weight: 800;
  color: var(--text);
}

/* 趋势图 */
.overview-trend-panel {
  padding: 18px 20px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card);
}

.overview-annual-panel {
  margin-top: 0;
  padding: 18px 20px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card);
}

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

.overview-trend-filters {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-left: auto;
}

.overview-trend-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.overview-trend-text {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.overview-trend-chart {
  min-height: 120px;
}

.overview-annual-chart {
  min-height: 148px;
}

.overview-trend-empty {
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.overview-trend-svg {
  width: 100%;
  height: 100%;
  min-height: 120px;
}

.overview-annual-svg {
  width: 100%;
  height: 100%;
  min-height: 148px;
}

.overview-trend-grid-line {
  stroke: #dbeafe;
  stroke-width: 1;
  stroke-dasharray: 5 5;
}

.overview-trend-area {
  fill: rgba(37, 99, 235, 0.12);
}

.overview-trend-line {
  fill: none;
  stroke: #2563eb;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.overview-annual-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.overview-annual-line-apply {
  stroke: #0f766e;
}

.overview-annual-line-admit {
  stroke: #f59e0b;
}

.overview-annual-point {
  fill: #ffffff;
  stroke-width: 3;
}

.overview-annual-point-apply {
  stroke: #0f766e;
}

.overview-annual-point-admit {
  stroke: #f59e0b;
}

.overview-trend-point {
  fill: #ffffff;
  stroke: #2563eb;
  stroke-width: 3;
}

.overview-trend-point-label {
  fill: #1e3a8a;
  font-size: 10px;
  font-weight: 700;
  text-anchor: middle;
}

.overview-trend-axis-label {
  fill: var(--muted);
  font-size: 9px;
  font-weight: 500;
  text-anchor: middle;
}

.overview-chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.overview-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

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

.legend-dot-apply {
  background: #0f766e;
}

.legend-dot-admit {
  background: #f59e0b;
}

.overview-annual-bar {
  transition: opacity 0.18s ease;
}

.overview-annual-bar:hover {
  opacity: 0.82;
}

.overview-annual-bar-apply {
  fill: #0f766e;
}

.overview-annual-bar-admit {
  fill: #f59e0b;
}

.overview-annual-value-label {
  fill: var(--text);
  font-size: 9px;
  font-weight: 700;
  text-anchor: middle;
}

/* 高访问量用户 */
.overview-top-visitors-panel {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.top-visitors-table-wrap {
  margin-top: 16px;
  max-height: 320px;
  overflow-y: auto;
}

/* 网格布局 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.create-admin-grid {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  column-gap: 42px;
  row-gap: 22px;
}

/* 操作区 */
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.actions-right {
  justify-content: flex-end;
}

.align-end {
  display: flex;
  align-items: flex-end;
}

/* 筛选组件 */
.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-select {
  height: 32px;
  padding: 0 32px 0 12px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.filter-select:hover {
  border-color: var(--primary);
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 表单字段 */
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

.field input,
.field select {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  box-sizing: border-box;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #fdfdfd;
  font-size: 14px;
  transition: 0.2s;
}

.field input:focus,
.field select:focus {
  border-color: var(--primary);
  outline: none;
  background: #fff;
}

/* 按钮 */
.btn {
  height: 48px;
  padding: 0 24px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  background: var(--primary);
  color: white;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}
.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}
.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}
.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* 刷新图标按钮 */
.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon .refresh-icon {
    width: 16px;
    height: 16px;
}

.btn-icon.spinning .refresh-icon {
    animation: spin 0.8s linear infinite;
}

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

/* 模态框 */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    backdrop-filter: blur(2px);
    transition: opacity 0.3s;
}

.modal-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 20px 40px -15px rgba(0,0,0,0.15);
    z-index: 1001;
    width: min(480px, 90vw);
    padding: 32px;
    transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    opacity: 1;
}

#confirm-modal {
    z-index: 1003;
}

.modal-box.hidden, .modal-backdrop.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -45%) scale(0.95);
}

.modal-title {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
}

.modal-body {
    margin-bottom: 28px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.modal-body .field {
    width: 100%;
}

.modal-vertical-form {
    display: block;
}

.modal-vertical-form .field {
    margin: 0 0 16px;
}

.modal-help-text {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-box-lg {
    max-width: 800px;
    width: 90%;
}

/* 动画切换 */
.admin-section {
  display: none;
}
.admin-section.active {
  display: flex;
  width: 100%;
  min-height: var(--admin-panel-min-height);
}

.admin-section.active > .card {
  flex: 1;
  margin-bottom: 0;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hidden {
  display: none !important;
}

/* 深色模式切换按钮 */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius);
    background: var(--bg-secondary);
    color: var(--muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}

html.dark .theme-toggle-btn {
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary);
}

.theme-toggle-btn svg {
    width: 18px;
    height: 18px;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes glow {
    0% { box-shadow: 0 0 20px rgba(37, 99, 235, 0.25); }
    100% { box-shadow: 0 0 30px rgba(37, 99, 235, 0.4); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.3s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.2s ease-out;
}

/* 毛玻璃效果 */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

html.dark .glass {
    background: rgba(15, 23, 42, 0.8);
}

/* 深色模式补充 */
html.dark table {
    background: var(--card);
}

html.dark th {
    background: var(--bg-secondary);
    color: var(--muted);
}

html.dark td {
    border-bottom-color: var(--border);
}

html.dark .field input,
html.dark .field select {
    background: var(--bg-secondary);
    border-color: var(--border);
    color: var(--text);
}

html.dark .field input:focus,
html.dark .field select:focus {
    border-color: var(--primary);
    background: var(--card);
}

html.dark .btn {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

html.dark .btn-secondary {
    background: var(--bg-secondary);
    color: var(--text);
}

html.dark .modal-box {
    background: var(--card);
    border: 1px solid var(--border);
}

html.dark .modal-backdrop {
    background: rgba(0, 0, 0, 0.6);
}

html.dark .status-toast {
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

html.dark .session-dropdown {
    background: linear-gradient(135deg, var(--card) 0%, var(--bg-secondary) 100%);
    border-color: var(--border);
}

html.dark .session-menu {
    background: var(--card);
    border-color: var(--border);
}

html.dark .session-menu-item:hover {
    background: var(--bg-secondary);
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
}

html.dark ::-webkit-scrollbar-thumb {
    background: var(--border);
}

html.dark ::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
}

/* 数据管理页面 */
.data-mgmt-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.data-mgmt-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.section-subtitle {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.data-summary-section,
.data-import-history-section {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.data-summary-table-wrap,
.data-import-history-table-wrap {
    max-height: 300px;
    overflow-y: auto;
}

.data-summary-table-wrap th,
.data-summary-table-wrap td,
.data-import-history-table-wrap th,
.data-import-history-table-wrap td {
    padding: 12px 16px;
    text-align: left;
}

.data-summary-table-wrap th,
.data-import-history-table-wrap th {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-summary-table-wrap td,
.data-import-history-table-wrap td {
    font-size: 13px;
    color: var(--text);
}

.data-summary-table-wrap .empty-row,
.data-import-history-table-wrap .empty-row {
    text-align: center;
    color: var(--muted);
    padding: 32px;
}

.data-actions-section {
    padding: 20px 0;
}

.data-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.data-action-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font: inherit;
}

.data-action-card:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.data-action-card.data-action-danger:hover {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.data-action-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.data-action-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.data-action-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.data-action-desc {
    font-size: 12px;
    color: var(--muted);
}

.data-delete-panel {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-secondary);
    margin-top: 16px;
}

.data-delete-modal {
    width: min(560px, 92vw);
    margin-top: 0;
}

.import-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.import-status-badge.success {
    color: #047857;
    background: rgba(16, 185, 129, 0.12);
}

.import-status-badge.failed {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.12);
}

.import-history-reason {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-delete-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.data-delete-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.data-delete-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 10px;
    color: var(--text-secondary);
}

.data-delete-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.data-delete-close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.data-delete-close-btn:hover {
    background: var(--border);
    color: var(--text);
}

.data-delete-filter-group {
    margin-bottom: 16px;
}

.data-delete-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.data-delete-select {
    width: 100%;
    max-width: 200px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.data-delete-select:hover {
    border-color: var(--primary);
}

.data-delete-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.data-delete-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    margin-bottom: 16px;
    transition: all 0.2s;
}

.data-delete-info.warning {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
}

.data-delete-info-icon {
    flex-shrink: 0;
    color: var(--text-secondary);
}

.data-delete-info.warning .data-delete-info-icon {
    color: #ef4444;
}

.data-delete-info p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.data-delete-info.warning p {
    color: #dc2626;
    font-weight: 500;
}

.data-delete-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.data-delete-confirm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.data-delete-confirm-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

.data-delete-confirm-btn:disabled {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: not-allowed;
    box-shadow: none;
}

.data-delete-confirm-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.data-delete-confirm-btn.loading span {
    display: none;
}

.data-delete-confirm-btn.loading::after {
    content: "删除中...";
}

.data-pagination button {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card);
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.data-pagination button:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.data-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.data-pagination button.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
