/* ============================================================
   Link Platform — Clean White Theme
   Design: Pure White + Soft Shadows + Gradient Accents
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  /* 背景色 - 白色系 */
  --bg-base: #ffffff;
  --bg-page: #f5f7fa;
  --bg-card: #ffffff;
  --bg-card-hover: #fafbfc;
  --bg-sidebar: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.95);
  --bg-glass-hover: rgba(245, 247, 250, 0.98);
  --bg-subtle: #f8f9fb;
  --border-light: rgba(0, 0, 0, 0.06);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-accent: rgba(61, 90, 74, 0.3);

  /* 文字颜色 - 深灰系 */
  --text-primary: #1a1d26;
  --text-secondary: #5a6275;
  --text-muted: #9095a5;
  --text-accent: #3d5a4a;

  /* 强调色 - 森林绿系 */
  --accent-primary: #3d5a4a;
  --accent-primary-light: #5c7d6a;
  --accent-primary-dark: #2d3f34;
  --accent-success: #10b981;
  --accent-warning: #d97706;
  --accent-danger: #ef4444;
  --accent-info: #3b82f6;

  /* 阴影效果 */
  --shadow-xs: 0 1px 2px rgba(30, 48, 38, 0.05);
  --shadow-sm: 0 2px 8px rgba(30, 48, 38, 0.07);
  --shadow-md: 0 4px 16px rgba(30, 48, 38, 0.09);
  --shadow-lg: 0 8px 32px rgba(30, 48, 38, 0.11);
  --shadow-xl: 0 12px 48px rgba(30, 48, 38, 0.13);
  --shadow-card: 0 2px 12px rgba(30, 48, 38, 0.08), 0 1px 3px rgba(30, 48, 38, 0.05);
  --shadow-btn: 0 2px 8px rgba(61, 90, 74, 0.3);
  --shadow-glow: 0 4px 16px rgba(61, 90, 74, 0.2);

  /* 圆角 */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* 字体 */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* 布局 */
  --sidebar-w: 248px;
  --header-h: 64px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { font-size: 14px; }

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 淡淡的顶部渐变装饰 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(61, 90, 74, 0.03) 0%, transparent 300px);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.2); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-weight: 600; color: var(--text-primary); letter-spacing: -0.02em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 0.95rem; color: var(--text-secondary); font-weight: 500; }
p { color: var(--text-secondary); }
.mono { font-family: var(--font-mono); }

/* ---------- Card ---------- */
.card {
  background: linear-gradient(
    145deg,
    rgba(255, 252, 248, 0.82) 0%,
    rgba(236, 244, 238, 0.68) 45%,
    rgba(220, 232, 224, 0.62) 100%
  );
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  backdrop-filter: blur(16px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-lg);
  box-shadow:
    0 2px 16px rgba(30, 48, 38, 0.08),
    0 10px 28px rgba(25, 42, 32, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  box-shadow:
    0 4px 20px rgba(30, 48, 38, 0.1),
    0 14px 36px rgba(25, 42, 32, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.65);
}

.card-elevated {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ---------- Layout ---------- */
.app-layout {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: linear-gradient(
    145deg,
    rgba(255, 252, 248, 0.88) 0%,
    rgba(236, 244, 238, 0.78) 45%,
    rgba(220, 232, 224, 0.72) 100%
  );
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
  box-shadow:
    0 2px 12px rgba(30, 48, 38, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(145deg, #3d5a4a 0%, #5c7d6a 55%, #6b9080 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow:
    0 3px 10px rgba(35, 55, 45, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: rgba(255, 252, 248, 0.95);
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #1a2e24;
  -webkit-text-fill-color: unset;
  background: none;
  -webkit-background-clip: unset;
}

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

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

.session-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 100px;
  padding: 6px 14px;
  transition: all var(--transition);
}
.session-badge:hover {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 2px 10px rgba(30, 48, 38, 0.08);
}

.session-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3d5a4a 0%, #5c7d6a 55%, #6b9080 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #faf9f6;
  box-shadow:
    0 2px 6px rgba(35, 55, 45, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.session-info {
  display: flex;
  flex-direction: column;
}

.session-username {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.session-userid {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.2;
}

.session-role {
  font-size: 11px;
  color: var(--text-muted);
}

.session-balance {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-left: 10px;
  border-left: 1px solid var(--border-light);
  margin-left: 4px;
}

.session-balance-label {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.2;
}

.session-balance-amount {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-primary);
  line-height: 1.2;
}

/* ---------- 我的余额页 ---------- */
#view-my-balance .balance-page-header {
  margin-bottom: 4px;
}

.balance-hero {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 20px;
}

.balance-hero-glow {
  position: absolute;
  top: -40%;
  right: -8%;
  width: 52%;
  height: 140%;
  background: radial-gradient(ellipse at center, rgba(61, 90, 74, 0.09) 0%, transparent 68%);
  pointer-events: none;
}

.balance-hero-inner {
  position: relative;
  padding: 22px 24px 20px;
}

.balance-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.balance-hero-intro {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.balance-hero-icon-wrap {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(61, 90, 74, 0.12), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(61, 90, 74, 0.14);
  color: var(--accent-primary);
}

.balance-hero-icon {
  stroke: currentColor;
  fill: none;
}

.balance-hero-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.balance-hero-lead {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0;
}

.balance-refresh-btn {
  flex-shrink: 0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}

.balance-refresh-btn:hover {
  background: var(--bg-card);
  border-color: rgba(61, 90, 74, 0.25);
}

.balance-stat-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 14px;
}

@media (max-width: 640px) {
  .balance-stat-grid {
    grid-template-columns: 1fr;
  }
  .balance-hero-top {
    flex-direction: column;
    align-items: stretch;
  }
  .balance-refresh-btn {
    align-self: flex-start;
  }
}

.balance-stat-card {
  border-radius: var(--radius-md);
  padding: 18px 20px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.balance-stat-card:hover {
  border-color: rgba(61, 90, 74, 0.12);
  box-shadow: var(--shadow-xs);
}

.balance-stat-card--main {
  background: linear-gradient(135deg, rgba(61, 90, 74, 0.06) 0%, rgba(255, 255, 255, 0.92) 48%, var(--bg-card) 100%);
  border-color: rgba(61, 90, 74, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.balance-stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.balance-stat-value {
  font-family: var(--font-mono);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.balance-stat-value--muted {
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.balance-logs-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.balance-logs-card-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg-card) 100%);
}

.balance-logs-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}

.balance-logs-card-title-icon {
  color: var(--accent-primary);
  flex-shrink: 0;
}

.balance-logs-card-desc {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  padding-left: 28px;
}

.balance-table-wrap {
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.balance-table {
  table-layout: auto;
}

.balance-table th {
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
}

.balance-table td {
  font-size: 13px;
  vertical-align: middle;
}

.balance-table tbody tr:nth-child(even) {
  background: rgba(248, 249, 251, 0.65);
}

.balance-table tbody tr:hover {
  background: rgba(61, 90, 74, 0.04);
}

.balance-table td.mono-cell {
  color: var(--text-secondary);
}

.balance-table td.balance-table-placeholder {
  text-align: center;
  padding: 36px 16px;
  font-size: 13px;
}

.balance-table .bl-desc {
  white-space: normal;
  max-width: 280px;
  line-height: 1.45;
  color: var(--text-secondary);
  word-break: break-word;
}

.balance-table .bl-money {
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

.balance-table .bl-amount {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.balance-table .bl-amount--in {
  color: var(--accent-success);
}

.balance-table .bl-amount--out {
  color: var(--accent-info);
}

.balance-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px 18px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-subtle);
}

.balance-pagination-info {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 160px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.balance-pagination .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.bp-size-select-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bp-page-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- 余额面板（超管） ---------- */
#view-balance-panel .page-header { margin-bottom: 4px; }

.bp-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .bp-summary-grid { grid-template-columns: 1fr; }
}

.bp-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.bp-stat-card:hover {
  border-color: rgba(61, 90, 74, 0.12);
  box-shadow: var(--shadow-sm);
}

.bp-stat-card--accent {
  background: linear-gradient(135deg, rgba(61, 90, 74, 0.05) 0%, var(--bg-card) 100%);
  border-color: rgba(61, 90, 74, 0.16);
}

.bp-stat-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bp-stat-icon--blue {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-info);
}

.bp-stat-icon--purple {
  background: rgba(139, 92, 246, 0.1);
  color: #6b9080;
}

.bp-stat-icon--warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-warning);
}

.bp-stat-icon svg {
  stroke: currentColor;
  fill: none;
}

.bp-stat-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.bp-stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.bp-stat-value {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.bp-stat-card--accent .bp-stat-value {
  color: var(--accent-primary);
}

.bp-stat-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.bp-logs-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.bp-logs-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg-card) 100%);
}

.bp-logs-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}

.bp-logs-title svg { color: var(--accent-primary); }

.bp-logs-desc {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  padding-left: 28px;
}

.bp-filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.bp-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.bp-table-wrap {
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.bp-table th {
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
}

.bp-table td { font-size: 13px; vertical-align: middle; }

.bp-table tbody tr:nth-child(even) {
  background: rgba(248, 249, 251, 0.65);
}

.bp-table tbody tr:hover {
  background: rgba(61, 90, 74, 0.04);
}

.bp-table-placeholder {
  text-align: center;
  padding: 36px 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.bp-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px 18px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-subtle);
}

.bp-pagination-info {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 180px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.bp-pagination .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 用户搜索组合框 */
.bp-combobox-wrap {
  position: relative;
}

.bp-combobox-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 240px;
  overflow-y: auto;
  z-index: 200;
  min-width: 240px;
}

.bp-cb-item {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border-light);
}

.bp-cb-item:last-child { border-bottom: none; }

.bp-cb-item:hover {
  background: rgba(61, 90, 74, 0.07);
  color: var(--accent-primary);
}

.bp-cb-item:first-child {
  color: var(--text-muted);
  font-size: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.bp-cb-id {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 6px;
}

.bp-cb-empty {
  padding: 16px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}


/* Body area */
.app-body {
  display: flex;
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
  min-width: 0;
  overflow-x: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  min-height: calc(100vh - var(--header-h));
  background: linear-gradient(
    145deg,
    rgba(255, 252, 248, 0.82) 0%,
    rgba(236, 244, 238, 0.72) 45%,
    rgba(220, 232, 224, 0.65) 100%
  );
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  backdrop-filter: blur(16px) saturate(1.1);
  border-right: 1px solid rgba(255, 255, 255, 0.55);
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  z-index: 30;
  overflow-y: auto;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 2px 0 12px rgba(30, 48, 38, 0.05);
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(35, 52, 42, 0.5);
  padding: 12px 12px 6px;
}

.sidebar-btn {
  width: 100%;
  min-width: 0;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: rgba(35, 52, 42, 0.65);
  font-family: var(--font-main);
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
  position: relative;
}

.sidebar-btn > span:not(.badge) {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* SVG 线框图标（与 .sidebar-btn .icon 共享） */
.icon-svg, .sidebar-btn .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.5;
  color: #3d5a4a;
  transition: opacity 0.2s ease, color 0.2s ease;
  vertical-align: middle;
}

.sidebar-btn:hover {
  background: rgba(255, 255, 255, 0.5);
  color: #1a2e24;
  border-color: rgba(255, 255, 255, 0.65);
}

.sidebar-btn:hover .icon-svg,
.sidebar-btn:hover .icon { opacity: 1; color: #3d5a4a; }

.sidebar-btn.active {
  background: linear-gradient(90deg, rgba(61, 90, 74, 0.12) 0%, rgba(61, 90, 74, 0.04) 100%);
  border-color: rgba(92, 125, 106, 0.3);
  color: #2d3f34;
  font-weight: 600;
}

.sidebar-btn.active .icon-svg,
.sidebar-btn.active .icon { opacity: 1; color: #3d5a4a; }

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

.sidebar-btn.admin-only { display: none; }
body.is-admin .sidebar-btn.admin-only { display: flex; }

.sidebar-btn .badge {
  flex-shrink: 0;
  margin-left: auto;
  background: rgba(61, 90, 74, 0.1);
  color: var(--accent-primary);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 100px;
}

/* Main Content
   顶栏为 position:fixed 不占文档流，若仅 padding:28px，主区会从视口 y=0 起排，
   第一行（尤其右侧操作按钮）会与顶栏用户名/退出在垂直方向重叠、难以点击。
   顶部留白 = 顶栏高度 + 与内容间距。 */
.main-content {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  padding: 28px;
  padding-top: calc(var(--header-h) + 16px);
  min-height: calc(100vh - var(--header-h));
  position: relative;
  z-index: 0;
  max-width: 100%;
}

.view-panel {
  max-width: 100%;
}

/* ---------- Page Header ---------- */
.page-header {
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.page-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.page-title { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.03em; color: #1a2e24; }
.page-subtitle {
  font-size: 13px;
  color: rgba(35, 52, 42, 0.6);
  max-width: 100%;
  line-height: 1.45;
}
.page-header > .btn,
.page-header > .page-actions {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}
.page-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ---------- Section Divider ---------- */
.section { margin-bottom: 28px; }
.section:last-child { margin-bottom: 0; }
.section-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(35, 52, 42, 0.55);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.5);
}

/* ---------- Form Elements ---------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
  max-width: 100%;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 100%;
}

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

.form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.form-label .required {
  color: var(--accent-danger);
  margin-left: 2px;
}

.form-input,
.form-select {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-sm);
  color: #1a2e24;
  font-family: var(--font-main);
  font-size: 13.5px;
  padding: 10px 14px;
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
  box-shadow: inset 0 1px 2px rgba(30, 48, 38, 0.05);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.form-input::placeholder { color: rgba(40, 58, 48, 0.45); }

.form-input:focus,
.form-select:focus {
  border-color: rgba(92, 125, 106, 0.55);
  background: rgba(255, 255, 255, 0.7);
  box-shadow:
    inset 0 1px 2px rgba(30, 48, 38, 0.04),
    0 0 0 3px rgba(92, 125, 106, 0.15);
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  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='%239095a5' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.form-select option { background: var(--bg-card); color: var(--text-primary); }

/* ================================================================
   Custom Select 美化
   ================================================================ */
.csel-wrapper {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  /* 继承原始 select 的宽度，不强制撑满 */
  width: auto;
  max-width: 100%;
}

.csel-wrapper.csel-wrapper--searchable {
  width: 100%;
}

.csel-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: inherit;
  line-height: 1.35;
  outline: none;
  padding: 0;
}

.csel-search-input::placeholder {
  color: var(--text-muted);
  opacity: 0.85;
}

.csel-trigger.csel-trigger--searchable {
  cursor: text;
  white-space: nowrap;
}

.csel-option.csel-option--filtered {
  display: none !important;
}

.csel-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 13.5px;
  padding: 10px 34px 10px 14px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-xs);
  min-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.csel-trigger:focus,
.csel-trigger.focused {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(61, 90, 74, 0.12);
}

.csel-trigger.open {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(61, 90, 74, 0.12);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.csel-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.csel-arrow {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  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='%239095a5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.2s ease;
}

.csel-trigger.open .csel-arrow {
  transform: rotate(180deg);
}

.csel-dropdown {
  position: absolute;
  top: calc(100% - 2px);
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--bg-card);
  border: 1px solid var(--accent-primary);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 0 0 3px rgba(61, 90, 74, 0.08);
  max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;
  animation: cselFadeIn 0.15s ease;
}

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

.csel-dropdown::-webkit-scrollbar { width: 5px; }
.csel-dropdown::-webkit-scrollbar-track { background: transparent; }
.csel-dropdown::-webkit-scrollbar-thumb { background: rgba(61, 90, 74, 0.3); border-radius: 99px; }

.csel-option {
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.csel-option:hover {
  background: rgba(61, 90, 74, 0.06);
  color: var(--accent-primary);
}

.csel-option.selected {
  background: rgba(61, 90, 74, 0.1);
  color: var(--accent-primary);
  font-weight: 600;
}

textarea.form-input {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

/* Drawer 内的 textarea 稍微紧凑 */
.sfdd-body textarea.form-input {
  padding: 8px 12px;
  font-size: 13px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 45px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 24px;
  cursor: pointer;
  transition: all 0.3s ease 0s;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
  text-transform: none;
  outline: none;
}

.btn:hover {
  transform: translateY(-3px);
}

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

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none !important;
}

/* Primary: 紫色渐变（默认） */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-dark));
  color: #fff;
  box-shadow: 0 4px 15px rgba(61, 90, 74, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-primary-light), var(--accent-primary));
  box-shadow: 0 8px 25px rgba(61, 90, 74, 0.5);
  transform: translateY(-5px);
}

/* Secondary: 玻璃白底 */
.btn-secondary {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(236, 244, 238, 0.55) 100%
  );
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #1a2e24;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 4px 15px rgba(30, 48, 38, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.btn-secondary:hover {
  border-color: rgba(92, 125, 106, 0.4);
  color: #2d3f34;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(236, 244, 238, 0.65) 100%
  );
  box-shadow:
    0 8px 25px rgba(30, 48, 38, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  transform: translateY(-5px);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
  transform: translateY(-5px);
}

/* Danger: 柔和红 */
.btn-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), #dc2626);
  color: #fff;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.45);
  transform: translateY(-5px);
}

/* Danger outline */
.btn-danger-outline {
  background: transparent;
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
  box-shadow: none;
  transform: none;
}
.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: #ef4444;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
  transform: translateY(-2px);
}
.btn-danger-outline:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.45);
  transform: translateY(-5px);
}

/* Ghost: 透明背景 */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  box-shadow: none;
}

/* 开关列：表头「状态」与下方滑块同一轴线居中 */
.table th.col-toggle,
.table td.col-toggle {
  text-align: center;
}
.table td.col-toggle {
  white-space: normal;
}

/* Toggle Switch - iOS 风格轨道开关 */
.toggle-switch-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}
.toggle-switch-label {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 12px;
  cursor: pointer;
  box-sizing: border-box;
  background: #3d5a4a;
  box-shadow: inset 0 0 0 1px rgba(61, 90, 74, 0.35);
  transition: background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
/* 关闭态（.off）时轨道变灰 */
.toggle-switch-label.off {
  background: #e5e7eb;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
/* 禁用态（checkbox disabled）时降低透明度，禁止点击 */
.toggle-switch-label:has(.toggle-switch-input:disabled) {
  opacity: 0.45;
  cursor: not-allowed;
}
/* 原生 checkbox 铺满父容器但完全透明，保留点击能力 */
.toggle-switch-label > .toggle-switch-input,
.toggle-switch-label > .toggle-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  z-index: 2;
  cursor: pointer;
  box-sizing: border-box;
}
.toggle-switch-label > .toggle-input {
  opacity: 0; /* 兼容旧写法 */
}
.toggle-switch-label:has(.toggle-switch-input:disabled) > .toggle-switch-input {
  cursor: not-allowed;
  pointer-events: none;
}
.toggle-switch-label > .toggle-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease;
  pointer-events: none;
  z-index: 1;
}
/* 非 off（启用态）时滑块右移 */
.toggle-switch-label:not(.off) > .toggle-switch-knob {
  transform: translateX(20px);
}
.toggle-switch-label > .toggle-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(61, 90, 74, 0.35);
  border-top-color: #3d5a4a;
  background: transparent;
  transform: translate(-50%, -50%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  box-sizing: border-box;
  z-index: 3;
}
.toggle-switch-label.loading > .toggle-loading {
  opacity: 1;
  visibility: visible;
  animation: toggleSpin 0.65s linear infinite;
}
.toggle-switch-label.loading > .toggle-switch-knob {
  opacity: 0.25;
}
@keyframes toggleSpin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.btn-ghost:hover {
  background: rgba(61, 90, 74, 0.06);
  color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(61, 90, 74, 0.12);
  transform: translateY(-3px);
}

/* Size variants */
.btn-sm {
  padding: 7px 16px;
  font-size: 12px;
  border-radius: 45px;
}

.btn-lg {
  padding: 13px 32px;
  font-size: 14px;
  border-radius: 45px;
}

.btn-full {
  width: 100%;
}

.btn-xs {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 45px;
}

/* ---------- Status Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 100px;
  letter-spacing: 0.02em;
}

.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}

.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--accent-success); }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: var(--accent-danger); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--accent-warning); }
.badge-unused { background: rgba(61, 90, 74, 0.08); color: var(--accent-primary); }
.badge-charging { background: rgba(245, 158, 11, 0.12); color: var(--accent-warning); }
.badge-info { background: rgba(59, 130, 246, 0.1); color: var(--accent-info); }
.badge-muted { background: rgba(0, 0, 0, 0.04); color: var(--text-muted); }
.badge-purple { background: rgba(139, 92, 246, 0.1); color: #6b9080; }

/* Eling status badges */
.badge-charging { background: rgba(59, 130, 246, 0.1); color: var(--accent-info); }
.badge-unused { background: rgba(245, 158, 11, 0.1); color: var(--accent-warning); }
.badge-eling-success { background: rgba(16, 185, 129, 0.1); color: var(--accent-success); }
.badge-eling-error { background: rgba(239, 68, 68, 0.1); color: var(--accent-danger); }

/* ---------- Tables ---------- */
.table-wrap {
  background: linear-gradient(
    145deg,
    rgba(255, 252, 248, 0.8) 0%,
    rgba(236, 244, 238, 0.68) 45%,
    rgba(220, 232, 224, 0.62) 100%
  );
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-md);
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  box-shadow:
    0 2px 12px rgba(30, 48, 38, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

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

.table th {
  background: rgba(255, 252, 248, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: rgba(35, 52, 42, 0.6);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
}

.table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  color: #1a2e24;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.2);
}

.table tr:last-child td { border-bottom: none; }

.table tbody tr {
  transition: background 0.15s ease;
}

.table tbody tr:hover td {
  background: rgba(220, 232, 224, 0.5);
}

.table td.mono-cell {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-primary);
}

.table td.seq-cell {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
}

/* 任务列表表格 */
.table.table-task-list { table-layout: auto; }
.table.table-task-list th { text-align: center; }
.table.table-task-list th:first-child { text-align: left; }
.table.table-task-list td { text-align: center; }
.table.table-task-list td:first-child { text-align: left; }

/* 任务卡片网格 */
.task-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
  max-width: 100%;
}

.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: box-shadow 0.2s;
}

.task-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.task-card .tc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.task-card .tc-id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-accent);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-card .tc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.task-card .tc-stat {
  text-align: center;
  padding: 6px 4px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
}

.task-card .tc-stat-val {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
}

.task-card .tc-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.task-card .tc-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.task-card .tc-msg {
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.task-card .tc-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.task-card .tc-actions .btn {
  flex: 1;
  padding: 5px 8px;
  font-size: 12px;
  cursor: pointer;
  min-width: 0;
}

.task-card .tc-actions .btn.btn-danger {
  flex: 0 0 auto;
  min-width: 60px;
}

@keyframes cardHighlight {
  0%   { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.6); background: rgba(37, 99, 235, 0.05); }
  50%  { box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.3); background: rgba(37, 99, 235, 0.05); }
  100% { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.6); background: var(--bg-card); }
}

.task-card-highlight {
  animation: cardHighlight 0.6s ease-in-out 2;
}

/* 任务链接弹窗 */
.task-links-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.task-links-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  width: 700px;
  max-width: 95vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
}

.task-links-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.task-links-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.task-links-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
}

.task-links-list {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 2;
  color: var(--text);
  word-break: break-all;
}

.task-links-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--border-light);
}

.task-links-list-item:last-child {
  border-bottom: none;
}

.task-links-list-item .link-url {
  flex: 1;
  color: var(--text-accent);
}

.task-links-list-item .copy-btn {
  flex-shrink: 0;
  padding: 2px 8px;
  font-size: 11px;
  font-family: sans-serif;
  cursor: pointer;
  opacity: 0.7;
}

.task-links-list-item .copy-btn:hover {
  opacity: 1;
}

.task-links-modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.task-links-modal-footer .link-count {
  font-size: 13px;
  color: var(--text-secondary);
}

.table td.secondary { color: var(--text-secondary); }
.table td.reason-cell {
  color: var(--text-secondary);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 链接列表：colgroup + table-layout:fixed，列与表头一一对应（已去掉「链接编码」列） */
.table.table-link-list {
  table-layout: fixed;
  width: 100%;
}
.table.table-link-list .col-ll-cb { width: 42px; }
.table.table-link-list .col-ll-seq { width: 48px; }
/* 完整链接列吃掉中间留白，宽度随表格拉伸 */
.table.table-link-list .col-ll-url { width: auto; min-width: 200px; }
.table.table-link-list .col-creator { width: 88px; }
.table.table-link-list .col-ll-rs { width: 108px; }
.table.table-link-list .col-eling { width: 108px; }
.table.table-link-list .col-ll-time { width: 156px; }
.table.table-link-list .col-ll-time-done { width: 156px; }
.table.table-link-list .col-ll-act { width: 118px; }

.table.table-link-list th,
.table.table-link-list td {
  padding: 10px 12px;
  vertical-align: middle;
}

.table.table-link-list thead th:nth-child(2),
.table.table-link-list tbody td:nth-child(2) {
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}

.table.table-link-list td.td-ll-time,
.table.table-link-list td.td-ll-time-done {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.table.table-link-list td:last-child {
  text-align: right;
}
.table.table-link-list th:last-child {
  text-align: right;
}

/* 创建者列、Eling 列：普通用户隐藏表头与单元格（仍占位 9 列，与 colgroup 一致） */
.table.table-link-list th.col-creator,
.table.table-link-list td.td-creator,
.table.table-link-list th.col-eling,
.table.table-link-list td.td-eling { display: none; }

body.sa-show-creator .table.table-link-list th.col-creator,
body.sa-show-creator .table.table-link-list td.td-creator,
body.sa-show-creator .table.table-link-list th.col-eling,
body.sa-show-creator .table.table-link-list td.td-eling { display: table-cell; }

.table.table-link-list th {
  color: var(--text-secondary);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: none;
  font-weight: 600;
}

.table.table-link-list .th-ll-cb {
  padding: 10px 6px;
  text-align: center;
}

.table.table-link-list tbody td:first-child {
  padding: 10px 6px;
  text-align: center;
  overflow: visible;
}

/* 9 列：cb / 序号 / 链接 / 创建者 / 充值状态 / Eling / 创建时间 / 完成时间 / 操作 */
.table.table-link-list td:nth-child(5),
.table.table-link-list td:nth-child(6) {
  white-space: normal;
  line-height: 1.45;
  overflow: visible;
}

.table.table-link-list td:nth-child(7),
.table.table-link-list td:nth-child(8) {
  overflow: visible;
  white-space: nowrap;
}

.table.table-link-list td:nth-child(9) {
  overflow: visible;
  white-space: nowrap;
}

/* 链接列设置比例宽度，其余列自然分配剩余空间 */

.table.table-link-list .link-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  width: 100%;
}

.table.table-link-list td.seq-cell {
  white-space: nowrap;
}

/* 行内删除：弱化实心大红块 */
.btn.btn-link-delete {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.38);
  color: #dc2626;
  font-weight: 600;
}
.btn.btn-link-delete:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.55);
  color: #b91c1c;
}

/* 项目列表：与 .table 统一网格，避免长文案挤占邻列 */
#view-project-list .glass-card {
  min-width: 0;
  max-width: 100%;
}

.system-form-default-card {
  margin-bottom: 16px;
}
.system-form-default-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}
.system-form-default-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.system-form-default-icon {
  color: var(--accent-primary);
  margin-top: 2px;
  flex-shrink: 0;
}
.system-form-default-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.system-form-default-hint {
  font-size: 11px;
  color: var(--text-muted);
}
.system-form-default-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 20px;
}
.sfd-preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 4px 10px;
}
.sfd-preview-chip .chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sfd-preview-chip .chip-dot.text { background: var(--text-primary); }
.sfd-preview-chip .chip-dot.accent { background: var(--accent-primary); }
.sfd-preview-chip .chip-dot.success { background: #10b981; }
.sfd-preview-chip .chip-dot.warning { background: #f59e0b; }
.sfd-preview-chip .chip-dot.danger { background: #ef4444; }
.sfd-preview-chip .chip-dot.muted { background: #94a3b8; }

.sfd-drawer {
  width: 560px;
  max-width: 92vw;
  max-height: 88vh;
  background: linear-gradient(
    145deg,
    rgba(255, 252, 248, 0.88) 0%,
    rgba(236, 244, 238, 0.72) 45%,
    rgba(220, 232, 224, 0.66) 100%
  );
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255,255,255,0.08) inset;
}
.sfd-drawer.hidden { display: none; }
.sfdd-body {
  overflow-y: auto;
  flex: 1;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
}
.form-label-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.project-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.project-list-toolbar h3 {
  margin: 0;
  min-width: 0;
}

.project-list-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.project-table-scroll {
  overflow-x: auto;
  max-width: 100%;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px 6px;
  scrollbar-gutter: stable;
}

.project-table-scroll::-webkit-scrollbar {
  height: 8px;
}

.project-table-scroll::-webkit-scrollbar-thumb {
  border-radius: 4px;
}

.table.table-project-list {
  min-width: 1260px;
  width: 100%;
}

.table.table-project-list .col-pl-id { width: 48px; }
.table.table-project-list .col-pl-biz { width: 68px; }
.table.table-project-list .col-pl-name { width: 140px; min-width: 110px; }
.table.table-project-list .col-pl-code { width: 100px; }
.table.table-project-list .col-pl-price { width: 76px; }
.table.table-project-list .col-pl-tag { width: 130px; min-width: 90px; }
.table.table-project-list .col-pl-type { width: 80px; }
.table.table-project-list .col-pl-toggle { width: 68px; }
.table.table-project-list .col-pl-time { width: 140px; }
.table.table-project-list .col-pl-act { width: 120px; }

.table.table-project-list td {
  padding: 8px 10px;
}
.table.table-project-list th {
  padding: 9px 10px;
}

.table.table-project-list td.col-pl-act-cell {
  overflow: visible;
  white-space: nowrap;
  vertical-align: middle;
}

.table.table-project-list .project-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

tr.row-disabled {
  opacity: 0.5;
}
tr.row-disabled:hover {
  opacity: 0.75;
}

.table-wrap.with-pagination {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

/* 超管链接表：链接列勿在宽屏下无限拉长 */
.table-wrap:has(#alsTableBody) table th:nth-child(3),
.table-wrap:has(#alsTableBody) table td:nth-child(3) {
  max-width: 380px;
}

/* ---------- Pagination ---------- */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-xs);
  flex-wrap: wrap;
}

.pagination-info { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.pagination-controls { display: flex; gap: 6px; }

.pagination-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-center {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.pagination-size-select {
  padding: 5px 28px 5px 10px;
  border: 1px solid rgba(92, 125, 106, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-primary);
  font-size: 12.5px;
  font-family: var(--font-main);
  cursor: pointer;
  outline: none;
  min-width: 58px;
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%235c7d6a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.pagination-size-select:hover {
  border-color: rgba(92, 125, 106, 0.6);
  background-color: rgba(255, 255, 255, 0.8);
}

.pagination-size-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(92, 125, 106, 0.15);
  background-color: rgba(255, 255, 255, 0.9);
}

.pagination-jump-input {
  width: 48px;
  padding: 3px 6px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 12px;
  text-align: center;
  outline: none;
}

.pagination-jump-input:focus {
  border-color: var(--accent-color);
}

.pagination-jump-input--sm {
  width: 40px;
}

/* 任务列表分页条 */
.task-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-subtle);
  flex-wrap: wrap;
}

.task-pagination-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-pagination-center {
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 600px) {
  .pagination-bar { flex-direction: column; align-items: stretch; }
  .pagination-center { flex-wrap: wrap; }
}

/* ---------- Toast Notification ---------- */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  align-items: center;
  width: auto;
  max-width: 420px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-size: 13px;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg), 0 4px 24px rgba(0,0,0,.08);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  max-width: 400px;
  pointer-events: auto;
  animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.toast-out {
  animation: toastOut 0.2s ease-in forwards;
}

.toast-icon { font-size: 16px; flex-shrink: 0; }
.toast-success .toast-icon { color: var(--accent-success); }
.toast-error .toast-icon { color: var(--accent-danger); }
.toast-warning .toast-icon { color: var(--accent-warning); }
.toast-info .toast-icon { color: var(--accent-info); }

.toast-success { border-color: rgba(16, 185, 129, 0.2); }
.toast-error { border-color: rgba(239, 68, 68, 0.2); }
.toast-warning { border-color: rgba(245, 158, 11, 0.2); }
.toast-info { border-color: rgba(59, 130, 246, 0.2); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-16px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(-8px) scale(0.95); }
}

/* ---------- Modal Overlay ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 48, 38, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: linear-gradient(
    145deg,
    rgba(255, 252, 248, 0.92) 0%,
    rgba(236, 244, 238, 0.82) 45%,
    rgba(220, 232, 224, 0.75) 100%
  );
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  backdrop-filter: blur(20px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 560px;
  box-shadow:
    0 8px 40px rgba(30, 48, 38, 0.14),
    0 20px 60px rgba(25, 42, 32, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a2e24;
}
.modal-close {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: rgba(35, 52, 42, 0.6);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.2s;
  backdrop-filter: blur(6px);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.6);
  color: #1a2e24;
}
.modal-footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---------- 确认弹窗样式 ---------- */
.confirm-modal-overlay {
  z-index: 10000;
  position: fixed;
  inset: 0;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(30, 48, 38, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal.confirm-modal {
  max-width: 420px;
  width: 100%;
  padding: 0;
  overflow: visible;
  margin: 0 auto;
  box-shadow:
    0 8px 40px rgba(30, 48, 38, 0.18),
    0 24px 64px rgba(25, 42, 32, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.confirm-modal__header {
  align-items: flex-start;
  gap: 14px;
  margin: 0;
  padding: 22px 22px 16px;
  background: linear-gradient(165deg, rgba(61, 90, 74, 0.08) 0%, transparent 55%);
  border-bottom: 1px solid var(--border-subtle);
}

.confirm-modal__head-text {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.confirm-modal__icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(61, 90, 74, 0.12) 0%, rgba(61, 90, 74, 0.06) 100%);
  border: 1px solid rgba(61, 90, 74, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #3d5a4a;
  color: var(--accent-primary);
}

.confirm-modal .modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.3;
}

.confirm-modal__close {
  flex-shrink: 0;
  margin-top: 2px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  font-size: 15px;
  transition: all var(--transition);
}

.confirm-modal__close:hover {
  background: var(--bg-card);
  border-color: var(--border-accent);
  color: var(--text-primary);
}

.confirm-modal__body {
  padding: 20px 22px;
}

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

.confirm-modal__footer {
  margin: 0;
  padding: 16px 22px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.confirm-modal__cancel {
  min-width: 80px;
}

.confirm-modal__ok {
  min-width: 80px;
}

/* ---------- 管理端：修改链接状态弹窗 ---------- */
.modal.als-status-modal {
  max-width: 520px;
  padding: 0;
  overflow: visible;
}

.als-status-modal__header {
  align-items: flex-start;
  gap: 16px;
  margin: 0;
  padding: 24px 24px 18px;
  background: linear-gradient(165deg, rgba(61, 90, 74, 0.08) 0%, transparent 55%);
  border-bottom: 1px solid var(--border-subtle);
}

.als-status-modal__head-text { min-width: 0; flex: 1; }

.als-status-modal__eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 6px;
  opacity: 0.9;
}

.als-status-modal .modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.25;
}

.als-status-modal__subtitle {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.als-status-modal__id {
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.als-status-modal__close {
  flex-shrink: 0;
  margin-top: 2px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  font-size: 16px;
}

.als-status-modal__close:hover {
  background: var(--bg-card);
  border-color: var(--border-accent);
  color: var(--text-primary);
}

.als-status-summary {
  margin: 0 24px 20px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
}

.als-status-summary__grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px 20px;
}

@media (max-width: 520px) {
  .als-status-summary__grid { grid-template-columns: 1fr; }
}

.als-status-summary__item { min-width: 0; }

.als-status-summary__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.als-status-summary__mono {
  font-size: 13px;
  font-weight: 600;
}

.als-status-summary__url {
  display: block;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
  word-break: break-all;
}

.als-status-summary__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-subtle);
}

.als-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 8px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
}

.als-status-pill__cap {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.als-status-pill__val .badge { margin: 0; }

.als-status-modal__body {
  padding: 0 24px 8px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.als-status-section {
  margin: 0;
  padding: 0;
  border: none;
}

.als-status-section__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.als-status-section__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-dark));
  box-shadow: 0 0 0 3px rgba(61, 90, 74, 0.2);
  flex-shrink: 0;
}

.als-status-section__dot--alt {
  background: linear-gradient(135deg, #0ea5e9, #3d5a4a);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.form-hint {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-muted);
}

.als-status-modal__footer {
  margin: 0;
  padding: 18px 24px 22px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-subtle);
}

/* 自定义下拉（替代原生 select，统一样式与圆角） */
.custom-select {
  position: relative;
  width: 100%;
  z-index: 1;
}

.als-status-modal .custom-select:focus-within {
  z-index: 20;
}

.custom-select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  box-shadow: var(--shadow-xs);
}

.custom-select__trigger:hover {
  border-color: var(--border-accent);
  background: var(--bg-subtle);
}

.custom-select__trigger:focus-visible {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(61, 90, 74, 0.12), var(--shadow-xs);
}

.custom-select__trigger[aria-expanded="true"] {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(61, 90, 74, 0.12), var(--shadow-xs);
}

.custom-select__value {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.custom-select__chev {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.85;
  transition: transform 0.2s ease;
}

.custom-select__trigger[aria-expanded="true"] .custom-select__chev {
  transform: rotate(180deg);
}

.custom-select__panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  padding: 6px;
  margin: 0;
  list-style: none;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0, 0, 0, 0.04);
  max-height: min(280px, 52vh);
  overflow-y: auto;
  animation: customSelectIn 0.18s ease;
}

@keyframes customSelectIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.custom-select__option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.custom-select__option:hover {
  background: rgba(61, 90, 74, 0.08);
}

.custom-select__option.is-selected {
  background: rgba(61, 90, 74, 0.12);
  font-weight: 600;
}

.custom-select__option:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: -2px;
}

.custom-select__dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.custom-select__dot--neutral { background: var(--text-muted); opacity: 0.7; }
.custom-select__dot--warning { background: #f59e0b; box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25); }
.custom-select__dot--success { background: #10b981; box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.22); }
.custom-select__dot--muted { background: #94a3b8; box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.2); }
.custom-select__dot--danger { background: #ef4444; box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.22); }

.custom-select__text {
  flex: 1;
}

/* ---------- Stats Cards ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  max-width: 100%;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all var(--transition);
  box-shadow: var(--shadow-xs);
}

.stat-card:hover {
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.blue { background: rgba(59, 130, 246, 0.1); color: var(--accent-info); }
.stat-icon.green { background: rgba(16, 185, 129, 0.1); color: var(--accent-success); }
.stat-icon.red { background: rgba(239, 68, 68, 0.1); color: var(--accent-danger); }
.stat-icon.yellow { background: rgba(245, 158, 11, 0.1); color: var(--accent-warning); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.1); color: #6b9080; }

.stat-info { flex: 1; min-width: 0; }

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ---------- Form Submit Page (统一提交页) ---------- */
.submit-page {
  max-width: 720px;
  margin: 0 auto;
}

.submit-header-card {
  background: linear-gradient(135deg, rgba(61, 90, 74, 0.06), rgba(139, 92, 246, 0.03));
  border: 1px solid rgba(61, 90, 74, 0.12);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 24px;
  text-align: center;
}

.submit-header-card .big-icon {
  font-size: 48px;
  margin-bottom: 12px;
  display: block;
}

.submit-header-card h2 { font-size: 1.3rem; margin-bottom: 8px; }
.submit-header-card p { font-size: 13px; color: var(--text-muted); }

.recharge-type-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 4px;
}

.recharge-type-tab {
  flex: 1;
  text-align: center;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 12px;
  cursor: pointer;
  transition: all var(--transition);
}

.recharge-type-tab:hover { color: var(--text-primary); }

.recharge-type-tab.active {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

/* Recharge type info */
.recharge-info {
  background: rgba(59, 130, 246, 0.04);
  border: 1px solid rgba(59, 130, 246, 0.08);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 12.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.recharge-info .icon { color: var(--accent-info); flex-shrink: 0; margin-top: 1px; }

.submit-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.submit-actions .btn { flex: 1; }

/* Quick batch */
.quick-count-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.quick-count-btn {
  background: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-sm);
  color: rgba(35, 52, 42, 0.7);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  padding: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.quick-count-btn:hover {
  border-color: rgba(92, 125, 106, 0.4);
  color: #2d3f34;
  background: rgba(255, 255, 255, 0.65);
  box-shadow:
    0 3px 10px rgba(30, 48, 38, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.quick-count-btn.selected {
  border-color: rgba(92, 125, 106, 0.6);
  background: linear-gradient(145deg, #3a5646 0%, #4d6b5a 45%, #5f7f6c 100%);
  color: #faf9f6;
  box-shadow:
    0 3px 10px rgba(35, 55, 45, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ---------- Login Page ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: url(/login-bg.png) no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  background-color: #2a3d32;
}

/* 特异性高于全局 .glass-card，与油画风背景协调的玻璃拟态 */
.login-page .login-card.glass-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 36px;
  background: linear-gradient(
    145deg,
    rgba(255, 252, 248, 0.52) 0%,
    rgba(236, 244, 238, 0.38) 45%,
    rgba(220, 232, 224, 0.34) 100%
  );
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 22px;
  box-shadow:
    0 4px 24px rgba(30, 48, 38, 0.12),
    0 24px 48px rgba(25, 42, 32, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

.login-page .login-card.glass-card:hover {
  transform: none;
  box-shadow:
    0 6px 28px rgba(30, 48, 38, 0.14),
    0 28px 56px rgba(25, 42, 32, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.62);
}

.login-brand {
  text-align: center;
  margin-bottom: 36px;
}

.login-brand-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(145deg, #3d5a4a 0%, #5c7d6a 55%, #6b9080 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 16px;
  color: rgba(255, 252, 248, 0.95);
  box-shadow:
    0 6px 20px rgba(35, 55, 45, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.login-brand h1 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #1a2e24;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  -webkit-text-fill-color: unset;
  background: none;
  -webkit-background-clip: unset;
}

.login-brand p {
  font-size: 13px;
  color: rgba(40, 58, 48, 0.72);
  margin-top: 6px;
}

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

.login-page .login-form .form-label {
  color: rgba(35, 52, 42, 0.75);
  font-weight: 500;
}

.login-page .login-form .form-input {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.65);
  color: #1a2e24;
  box-shadow: inset 0 1px 2px rgba(30, 48, 38, 0.06);
}

.login-page .login-form .form-input::placeholder {
  color: rgba(40, 58, 48, 0.45);
}

.login-page .login-form .form-input:focus {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(92, 125, 106, 0.55);
  box-shadow:
    inset 0 1px 2px rgba(30, 48, 38, 0.05),
    0 0 0 3px rgba(92, 125, 106, 0.2);
}

.login-page .login-form .btn-primary {
  background: linear-gradient(145deg, #3a5646 0%, #4d6b5a 45%, #5f7f6c 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #faf9f6;
  box-shadow:
    0 4px 16px rgba(35, 55, 45, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.login-page .login-form .btn-primary:hover {
  filter: brightness(1.06);
  box-shadow:
    0 6px 22px rgba(35, 55, 45, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* ---------- Link List Enhancements ---------- */
.link-detail-panel {
  background: rgba(61, 90, 74, 0.02);
  border: 1px solid rgba(61, 90, 74, 0.1);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 16px;
  display: none;
}

.link-detail-panel.visible { display: block; }

.link-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.link-detail-item { display: flex; flex-direction: column; gap: 3px; }

.link-detail-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.link-detail-value {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}

.link-detail-value.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-primary);
}

/* ---------- Inline filter bar ---------- */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.filter-bar .form-input,
.filter-bar .form-select {
  background: var(--bg-card);
  flex: 1;
  min-width: 140px;
  max-width: 100%;
}

.filter-bar .search-input-wrap {
  flex: 2;
  min-width: 0;
  position: relative;
}

.filter-bar .search-input-wrap .form-input {
  padding-left: 36px;
  width: 100%;
  max-width: 100%;
}

.filter-bar .search-input-wrap .search-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
  z-index: 1;
}

/* ---------- Task Status Card ---------- */
.task-status-card {
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  box-shadow: var(--shadow-xs);
}

.task-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.task-id {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-primary);
  background: rgba(61, 90, 74, 0.06);
  padding: 3px 8px;
  border-radius: 4px;
}

.task-progress {
  height: 6px;
  background: var(--bg-subtle);
  border-radius: 3px;
  overflow: hidden;
  margin: 12px 0;
}

.task-progress-bar {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-primary-light));
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.task-stats {
  display: flex;
  gap: 24px;
  margin-top: 10px;
}

.task-stat { display: flex; flex-direction: column; gap: 2px; }
.task-stat-val { font-size: 1.1rem; font-weight: 700; }
.task-stat-label { font-size: 11px; color: var(--text-muted); }

/* ---------- Callback Panel ---------- */
.callback-form-card {
  max-width: 600px;
}

/* ---------- Admin Users ---------- */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 100%;
}

.admin-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  align-self: stretch;
}

.admin-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.permission-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0;
}

.permission-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.perm-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}

.permission-item input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--accent-primary);
}

/* ---------- 用户管理卡片通用间距 ---------- */
.admin-card .form-field {
  margin-bottom: 14px;
}

.admin-card .form-field:last-of-type {
  margin-bottom: 0;
}

.admin-card .btn-full {
  margin-top: auto;
  padding-top: 16px;
}

.admin-card .feedback-row {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

/* 表单自定义权限开关（分配权限卡片内） */
.perm-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 4px;
}

.perm-toggle-label {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  cursor: pointer;
  background: var(--border-light);
  transition: background 0.2s;
  flex-shrink: 0;
}

.perm-toggle-label.on {
  background: var(--accent-success);
}

.perm-toggle-label input[type="checkbox"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.perm-toggle-label .knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
  transition: transform 0.22s;
  pointer-events: none;
  z-index: 1;
}

.perm-toggle-label.on .knob {
  transform: translateX(18px);
}

.perm-toggle-text {
  font-size: 13px;
  color: var(--text-secondary);
}

.perm-toggle-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 用户自定义价格卡片的按钮行 */
.price-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.price-btn-row .btn-primary {
  flex: 1;
}

.admin-card .price-btn-row {
  margin-top: auto;
  padding-top: 16px;
}

/* ---------- Utility ---------- */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--text-accent); }
.text-success { color: var(--accent-success); }
.text-danger { color: var(--accent-danger); }
.text-warning { color: var(--accent-warning); }
.text-info { color: var(--accent-info); }

.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.items-center { display: flex; align-items: center; }
.hidden { display: none !important; }

/* ---------- Empty state（表格 / 面板） ---------- */
.empty-state {
  text-align: center;
  vertical-align: middle !important;
  color: var(--text-secondary);
}

.empty-state-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 44px;
  max-width: 400px;
  margin: 0 auto;
}

.empty-state-illustration {
  color: var(--accent-primary);
  margin-bottom: 20px;
  position: relative;
}

.empty-state-illustration::before {
  content: '';
  position: absolute;
  inset: -18% -12% -8% -12%;
  background: radial-gradient(ellipse at 50% 60%, rgba(61, 90, 74, 0.14) 0%, transparent 68%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.empty-state-svg {
  display: block;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 6px 14px rgba(61, 90, 74, 0.08));
}

.empty-state-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  line-height: 1.4;
}

.empty-state-hint {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
  max-width: 340px;
}

.empty-state--panel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 220px;
  background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg-card) 100%);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  margin-top: 8px;
}

.empty-state--panel .empty-state-inner {
  max-width: 440px;
  padding: 48px 28px 52px;
}

.table td.empty-state {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  padding: 0;
  border-bottom: none !important;
}

.table tbody tr:has(> td.empty-state) {
  background: linear-gradient(180deg, rgba(248, 249, 251, 0.85) 0%, var(--bg-card) 55%) !important;
}

.table tbody tr:has(> td.empty-state):hover {
  background: linear-gradient(180deg, rgba(248, 249, 251, 0.92) 0%, var(--bg-card) 55%) !important;
}

/* Link cell copyable */
.link-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.link-cell-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.copy-btn {
  background: rgba(61, 90, 74, 0.06);
  border: 1px solid rgba(61, 90, 74, 0.1);
  border-radius: 4px;
  color: var(--accent-primary);
  font-size: 11px;
  padding: 2px 6px;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.copy-btn:hover {
  background: rgba(61, 90, 74, 0.1);
}

.copy-btn.copied {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.15);
  color: var(--accent-success);
}

/* Eling status filter tabs */
.status-filter-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 3px;
  flex-shrink: 0;
}

.status-filter-tab {
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.status-filter-tab:hover { color: var(--text-primary); }

.status-filter-tab.active {
  background: var(--accent-primary);
  color: #fff;
}

/* ---------- Settings Drawer ---------- */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 48, 38, 0.4);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 200;
  animation: fadeIn 0.2s ease;
}

.settings-drawer {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 440px;
  max-width: 90vw;
  max-height: 85vh;
  background: linear-gradient(
    145deg,
    rgba(255, 252, 248, 0.92) 0%,
    rgba(236, 244, 238, 0.82) 45%,
    rgba(220, 232, 224, 0.75) 100%
  );
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  backdrop-filter: blur(20px) saturate(1.15);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  z-index: 201;
  display: flex;
  flex-direction: column;
  animation: drawerIn 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
  overflow: hidden;
  box-shadow:
    0 8px 48px rgba(30, 48, 38, 0.16),
    0 24px 64px rgba(25, 42, 32, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes drawerIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
  position: relative;
}
.drawer-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,0.4), transparent);
}

.drawer-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.drawer-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: -4px;
}

.drawer-hint { font-size: 12px; color: var(--text-muted); line-height: 1.6; margin-top: -4px; }

.drawer-divider { height: 1px; background: var(--border-light); margin: 4px 0; }

/* ---------- Create Simple Page ---------- */
.create-simple-wrap { max-width: 680px; margin: 0 auto; }

.create-hero { text-align: center; padding: 40px 20px 8px; }

.create-hero-icon { font-size: 52px; margin-bottom: 14px; display: block; filter: drop-shadow(0 4px 16px rgba(61, 90, 74, 0.2)); }

.create-hero h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 8px; }

.create-hero p { font-size: 13px; color: var(--text-muted); }

.create-config-preview {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
}

.config-preview-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }

.config-preview-title { font-size: 12px; font-weight: 600; color: var(--text-secondary); letter-spacing: 0.04em; }

.config-preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.config-preview-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  min-width: 0;
}

.config-preview-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.config-preview-value {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-primary);
  font-family: var(--font-mono);
  line-height: 1.5;
  padding-left: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.create-action-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: var(--shadow-xs);
}

.create-btn-group { display: flex; gap: 12px; }

.btn-create-main {
  flex: 2;
  padding: 14px 20px;
  font-size: 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-primary), #2d3f34) !important;
  box-shadow: 0 4px 16px rgba(61, 90, 74, 0.3) !important;
}

.btn-create-main:hover { box-shadow: 0 6px 24px rgba(61, 90, 74, 0.4) !important; }

.btn-create-sub { flex: 1; padding: 14px 20px; font-size: 14px; border-radius: var(--radius-md); }

.cfg-type-desc { display: flex; flex-direction: column; gap: 8px; }

.cfg-type-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cfg-type-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cfg-type-tip { font-size: 11px; color: var(--text-muted); text-align: right; }

.header-gear { font-size: 18px !important; padding: 6px 8px !important; border-radius: var(--radius-sm) !important; min-width: unset !important; }
.header-gear:hover { background: var(--bg-subtle) !important; }

/* ---------- Glass Card (backward compatibility) ---------- */
.glass-card {
  background: linear-gradient(
    145deg,
    rgba(255, 252, 248, 0.82) 0%,
    rgba(236, 244, 238, 0.68) 45%,
    rgba(220, 232, 224, 0.62) 100%
  );
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  backdrop-filter: blur(16px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-lg);
  box-shadow:
    0 2px 16px rgba(30, 48, 38, 0.08),
    0 10px 28px rgba(25, 42, 32, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  padding: 24px;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.glass-card:hover {
  box-shadow:
    0 4px 20px rgba(30, 48, 38, 0.1),
    0 14px 36px rgba(25, 42, 32, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.65);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 16px; padding-top: calc(var(--header-h) + 12px); }
  .admin-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-count-grid { grid-template-columns: repeat(3, 1fr); }
  .filter-bar { flex-direction: column; }
  .filter-bar .form-input,
  .filter-bar .form-select { min-width: 100%; }
  .settings-drawer {
    width: calc(100vw - 32px);
    max-width: 100%;
    max-height: 90vh;
    top: calc(50% + 16px);
    transform: translate(-50%, calc(-50% + 16px));
  }
  .settings-drawer.show {
    animation: drawerInMobile 0.28s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
  }
  @keyframes drawerInMobile {
    from {
      opacity: 0;
      transform: translate(-50%, calc(-50% + 16px)) scale(0.9);
    }
    to {
      opacity: 1;
      transform: translate(-50%, calc(-50% + 16px)) scale(1);
    }
  }
  .create-btn-group { flex-direction: column; }
  .config-preview-grid { grid-template-columns: 1fr; }
  .destroy-top-stats { grid-template-columns: repeat(3, 1fr); overflow-x: auto; }
  .stat-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Animations & Micro-interactions ---------- */

/* Button ripple effect */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn:hover::after {
  opacity: 1;
}

/* 行悬停左侧指示条：必须在 td 上画，勿对 tr 使用 position:relative（会导致表头/表体列错位） */
.table tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--accent-primary);
}

/* Focus states for accessibility */
.btn:focus-visible,
.form-input:focus-visible,
.form-select:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Card hover lift effect */
.card, .glass-card, .stat-card, .admin-card {
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover, .glass-card:hover {
  /* hover 阴影在 .card / .glass-card 本体里已定义，这里只关掉上浮 */
}

.stat-card:hover {
  /* hover 阴影在 .stat-cards-grid .stat-card:hover 已定义 */
}

/* Input focus glow */
.form-input:focus,
.form-select:focus {
  outline: none;
}

/* Sidebar nav hover indicator */
.sidebar-btn::after {
  content: '';
  position: absolute;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-success);
  opacity: 0;
  transition: opacity var(--transition);
}

.sidebar-btn.active::after {
  opacity: 1;
}

/* Loading skeleton for future use */
.skeleton {
  background: linear-gradient(90deg, var(--bg-subtle) 25%, var(--bg-card) 50%, var(--bg-subtle) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-xs);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ================================================================
   表单自定义配置区
   ================================================================ */

.form-custom-card {
  margin-top: 16px;
  padding: 24px 28px;
}

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

.form-custom-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.form-custom-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.form-custom-toggle input[type="checkbox"] {
  display: none;
}

.toggle-track {
  width: 36px;
  height: 20px;
  background: var(--border-medium);
  border-radius: 10px;
  position: relative;
  transition: background 0.25s;
  flex-shrink: 0;
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.form-custom-toggle input:checked + .toggle-track {
  background: var(--accent-primary);
}

.form-custom-toggle input:checked + .toggle-track .toggle-thumb {
  transform: translateX(16px);
}

.form-custom-body {
  animation: slideDown .25s ease;
}

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

.form-custom-hint {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  padding: 12px 14px;
  background: var(--bg-subtle);
  border-radius: var(--radius-xs);
  border-left: 3px solid var(--accent-primary);
}

.form-custom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-custom-section {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.form-custom-section:last-child { border-bottom: none; }

.form-custom-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.project-rules-hint {
  padding: 10px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-primary);
  line-height: 1.6;
}

.color-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-swatch {
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-xs);
  padding: 2px;
  cursor: pointer;
  background: none;
  flex-shrink: 0;
}

.color-presets {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.color-preset {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  padding: 0;
}

.color-preset:hover {
  transform: scale(1.2);
  border-color: rgba(0,0,0,.2);
}

.color-preset.selected {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--accent-primary);
}

/* 预览弹窗 */
.form-preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn .2s ease;
}

.form-preview-overlay.hidden {
  display: none;
}

.form-preview-frame {
  width: 100%;
  max-width: 640px;
  height: 560px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.2);
  position: relative;
}

.form-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-secondary);
}

.form-preview-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--border-light);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.form-preview-close:hover {
  background: var(--border-medium);
}

.form-preview-iframe {
  width: 100%;
  height: calc(100% - 52px);
  border: none;
  display: block;
}

@media(max-width: 640px) {
  .form-custom-grid {
    grid-template-columns: 1fr;
  }
  .form-preview-frame {
    height: 90vh;
    border-radius: 0;
  }
}

/* ---------- 表单自定义：状态页面配置区 ---------- */
.form-custom-divider {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 24px 0 16px;
  padding: 14px 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-primary);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.status-page-group {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.status-page-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

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

.form-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  padding-top: 4px;
}

.form-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

/* ---------- 管理员链接状态表格 ---------- */
#alsTableBody .badge-success { background: rgba(16, 185, 129, 0.1); color: var(--accent-success); font-size: 12px; }
#alsTableBody .badge-danger { background: rgba(239, 68, 68, 0.1); color: var(--accent-danger); font-size: 12px; }
#alsTableBody .badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--accent-warning); font-size: 12px; }
#alsTableBody .badge-unused { background: rgba(61, 90, 74, 0.08); color: var(--accent-primary); font-size: 12px; }
#alsTableBody .badge-charging { background: rgba(245, 158, 11, 0.12); color: var(--accent-warning); font-size: 12px; }
#alsTableBody .badge-muted { background: var(--bg-subtle); color: var(--text-muted); font-size: 12px; }

/* ---------- API 日志页面 ---------- */
.api-log-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.api-log-card:hover { box-shadow: var(--shadow-xs); }

.api-log-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
  font-size: 12px;
  cursor: pointer;
}

.api-log-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
}

.api-log-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.api-log-path {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.api-log-expand-icon {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.api-log-expand-icon.open { transform: rotate(90deg); }

.api-log-body { display: none; padding: 16px; }
.api-log-body.open { display: block; }

.api-log-section { margin-bottom: 12px; }
.api-log-section:last-child { margin-bottom: 0; }

.api-log-section-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.api-log-json {
  background: #1e1e2e;
  color: #cdd6f4;
  border-radius: var(--radius-xs);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 300px;
  overflow-y: auto;
}

.badge-req { background: rgba(37, 99, 235, 0.1); color: #2563eb; font-size: 11px; padding: 2px 7px; border-radius: 4px; font-weight: 600; }
.badge-res { background: rgba(16, 185, 129, 0.1); color: #10b981; font-size: 11px; padding: 2px 7px; border-radius: 4px; font-weight: 600; }
.badge-in { background: rgba(61, 90, 74, 0.1); color: #3d5a4a; font-size: 11px; padding: 2px 7px; border-radius: 4px; font-weight: 600; }
.badge-out { background: rgba(245, 158, 11, 0.1); color: #d97706; font-size: 11px; padding: 2px 7px; border-radius: 4px; font-weight: 600; }
.badge-method { background: var(--bg-subtle); color: var(--text-secondary); font-size: 10px; padding: 1px 6px; border-radius: 3px; font-weight: 700; font-family: var(--font-mono); }
.badge-ok { background: rgba(16, 185, 129, 0.1); color: #10b981; font-size: 11px; padding: 2px 7px; border-radius: 4px; font-weight: 600; }
.badge-err { background: rgba(239, 68, 68, 0.1); color: #ef4444; font-size: 11px; padding: 2px 7px; border-radius: 4px; font-weight: 600; }

.api-log-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ---------- API 日志增强样式 ---------- */
.api-log-summary {
  font-size: 11px;
  color: var(--text-muted);
  padding: 8px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-log-body { display: none; padding: 16px; background: var(--bg-card); }
.api-log-body.open { display: block; }

.api-log-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border-light);
}

.api-log-section { margin-bottom: 12px; }
.api-log-section:last-child { margin-bottom: 0; }

.api-log-section-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.api-log-json {
  background: #1e1e2e;
  color: #cdd6f4;
  border-radius: var(--radius-xs);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 300px;
  overflow-y: auto;
}

/* JSON 语法高亮 */
.api-log-json .json-key { color: #89dceb; }
.api-log-json .json-string { color: #a6e3a1; }
.api-log-json .json-number { color: #fab387; }
.api-log-json .json-boolean { color: #cba6f7; }
.api-log-json .json-null { color: #6c7086; }

.badge-method-get { background: rgba(16, 185, 129, 0.15); color: #059669; }
.badge-method-post { background: rgba(37, 99, 235, 0.15); color: #2563eb; }
.badge-method-put { background: rgba(245, 158, 11, 0.15); color: #d97706; }
.badge-method-delete { background: rgba(239, 68, 68, 0.15); color: #dc2626; }
.badge-code { background: var(--bg-subtle); color: var(--text-muted); font-size: 10px; padding: 1px 6px; border-radius: 3px; font-family: var(--font-mono); }
.badge-cost { background: rgba(245, 158, 11, 0.1); color: #d97706; font-size: 10px; padding: 1px 6px; border-radius: 3px; font-family: var(--font-mono); }
.badge-ip { background: var(--bg-subtle); color: var(--text-muted); font-size: 10px; padding: 1px 6px; border-radius: 3px; font-family: var(--font-mono); }

.api-log-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); font-size: 13px; }
.api-log-empty .empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.api-log-empty .empty-hint { font-size: 12px; margin-top: 8px; color: var(--text-muted); }

/* ---------- 销毁链接页面 ---------- */
.form-textarea {
  width: 100%;
  min-height: 140px;
  padding: 12px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  max-width: 100%;
}
}
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(61, 90, 74, 0.1);
}

/* 顶部统计栏 */
.destroy-top-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 16px;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 4px;
}

.destroy-top-stat-item {
  background: linear-gradient(
    145deg,
    rgba(255, 252, 248, 0.82) 0%,
    rgba(236, 244, 238, 0.68) 45%,
    rgba(220, 232, 224, 0.62) 100%
  );
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  text-align: center;
  transition: box-shadow 0.2s, border-color 0.2s;
  box-shadow:
    0 2px 12px rgba(30, 48, 38, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.destroy-top-stat-item:hover {
  transform: none;
  box-shadow:
    0 4px 18px rgba(30, 48, 38, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.65);
}

.destroy-top-stat-num {
  font-size: 26px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 4px;
}

.destroy-top-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.destroy-top-stat-success .destroy-top-stat-num { color: var(--accent-success); }
.destroy-top-stat-fail .destroy-top-stat-num { color: var(--accent-danger); }
.destroy-top-stat-charging .destroy-top-stat-num { color: var(--accent-warning); }
.destroy-top-stat-unused .destroy-top-stat-num { color: var(--accent-primary); }
.destroy-top-stat-not-exist .destroy-top-stat-num { color: var(--text-muted); }

/* 文件上传按钮 */
.file-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.file-upload-btn:hover {
  background: var(--bg-card);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* 扫描结果 */
.destroy-scan-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-secondary);
  min-width: 0;
}
.destroy-scan-summary span { font-weight: 600; }
.destroy-scan-summary .s-success { color: var(--accent-success); }
.destroy-scan-summary .s-fail { color: var(--accent-danger); }
.destroy-scan-summary .s-charging { color: var(--accent-warning); }
.destroy-scan-summary .s-unused { color: var(--accent-primary); }
.destroy-scan-summary .s-not-exist { color: var(--text-muted); }

.destroy-link-list {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-page);
}

.destroy-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  gap: 12px;
}
.destroy-link-item:last-child { border-bottom: none; }
.destroy-link-item:hover { background: var(--bg-subtle); }

.destroy-link-code {
  font-family: var(--font-mono);
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 表单验证规则 */
.form-custom-divider {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: rgba(61, 90, 74, 0.05);
  border: 1px solid rgba(61, 90, 74, 0.15);
  border-radius: var(--radius-sm);
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-primary);
}
.form-custom-divider .form-custom-hint {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 12px;
}

.validate-rule-card {
  grid-column: 1 / -1;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
}
.validate-rule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.validate-rule-type {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(61, 90, 74, 0.1);
  color: var(--accent-primary);
}
.validate-rule-remove {
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
  background: none;
  border: none;
  line-height: 1;
  transition: all 0.2s;
}
.validate-rule-remove:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-danger);
}
.validate-rule-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.validate-rule-fields .form-field {
  margin-bottom: 0;
}
.validate-rule-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
}

.destroy-link-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  flex-shrink: 0;
}
.destroy-link-badge.can { background: rgba(16, 185, 129, 0.1); color: var(--accent-success); }
.destroy-link-badge.no { background: rgba(239, 68, 68, 0.1); color: var(--accent-danger); }

/* 底部统计结果 */
.destroy-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.destroy-stat-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
}

.destroy-stat-num {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 6px;
}

.destroy-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.destroy-stat-success .destroy-stat-num { color: var(--accent-success); }
.destroy-stat-fail .destroy-stat-num { color: var(--accent-danger); }
.destroy-stat-not-exist .destroy-stat-num { color: var(--text-muted); }
.destroy-stat-cannot .destroy-stat-num { color: var(--accent-warning); }

/* ============================================================
   数据分析页面样式
   ============================================================ */

.stat-range-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  background: linear-gradient(
    145deg,
    rgba(255, 252, 248, 0.7) 0%,
    rgba(236, 244, 238, 0.55) 45%,
    rgba(220, 232, 224, 0.5) 100%
  );
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    0 2px 16px rgba(30, 48, 38, 0.08),
    0 12px 32px rgba(25, 42, 32, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.stat-range-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(35, 52, 42, 0.7);
  white-space: nowrap;
}

.stat-range-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.stat-range-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.38);
  font-size: 13px;
  font-weight: 500;
  color: rgba(35, 52, 42, 0.7);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

.stat-range-btn:hover {
  border-color: rgba(92, 125, 106, 0.5);
  color: rgba(35, 52, 42, 0.95);
  background: rgba(255, 255, 255, 0.55);
}

.stat-range-btn.selected {
  background: linear-gradient(145deg, #3a5646 0%, #4d6b5a 45%, #5f7f6c 100%);
  border-color: rgba(255, 255, 255, 0.3);
  color: #faf9f6;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(35, 55, 45, 0.25);
}

.stat-custom-range {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.stat-granularity {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
}

.stat-granularity-btns {
  display: flex;
  gap: 4px;
}

.stat-granularity-btn {
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.35);
  color: rgba(35, 52, 42, 0.7);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(6px);
}

.stat-granularity-btn.selected {
  background: linear-gradient(145deg, #3a5646 0%, #4d6b5a 45%, #5f7f6c 100%);
  border-color: rgba(255, 255, 255, 0.3);
  color: #faf9f6;
}

.stat-date-input {
  width: 148px;
  font-size: 13px;
}

.stat-date-sep {
  font-size: 13px;
  color: rgba(40, 58, 48, 0.55);
}

/* 汇总卡片网格：8 张卡固定两行 × 四列 */
.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
  align-items: stretch;
}

.stat-cards-grid .stat-card {
  background: linear-gradient(
    145deg,
    rgba(255, 252, 248, 0.72) 0%,
    rgba(236, 244, 238, 0.58) 45%,
    rgba(220, 232, 224, 0.52) 100%
  );
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  min-height: 92px;
  box-shadow:
    0 2px 12px rgba(30, 48, 38, 0.08),
    0 10px 24px rgba(25, 42, 32, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.stat-cards-grid .stat-card:hover {
  box-shadow:
    0 4px 18px rgba(30, 48, 38, 0.12),
    0 14px 32px rgba(25, 42, 32, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.65);
}

/* 图标容器：苔绿渐变底 + 浅色图标 */
.stat-cards-grid .stat-card-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 12px rgba(35, 55, 45, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.stat-cards-grid .stat-card-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}

.stat-card-total .stat-card-icon {
  background: linear-gradient(145deg, #3d5a4a 0%, #5c7d6a 55%, #6b9080 100%);
}

.stat-card-success .stat-card-icon {
  background: linear-gradient(145deg, #2d6a4f 0%, #40916c 55%, #52b788 100%);
}

.stat-card-charging .stat-card-icon {
  background: linear-gradient(145deg, #5c6e2f 0%, #7d8f3f 55%, #9ab054 100%);
}

.stat-card-unused .stat-card-icon {
  background: linear-gradient(145deg, #3d5a4a 0%, #5c7d6a 55%, #6b9080 100%);
}

.stat-card-failed .stat-card-icon {
  background: linear-gradient(145deg, #7a3030 0%, #9e4040 55%, #b85555 100%);
}

.stat-card-destroyed .stat-card-icon {
  background: linear-gradient(145deg, #4a5568 0%, #6b7280 55%, #8b95a5 100%);
}

.stat-card-amount .stat-card-icon {
  background: linear-gradient(145deg, #7c3aed 0%, #9d5ce0 55%, #b87fe8 100%);
}

.stat-card-balance .stat-card-icon {
  background: linear-gradient(145deg, #0f766e 0%, #14877e 55%, #1a9e96 100%);
}

.stat-cards-grid .stat-card-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 6px;
}

.stat-cards-grid .stat-card-value {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-mono, ui-monospace, monospace);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #1a2e24;
}

.stat-cards-grid .stat-card-label {
  font-size: 12px;
  color: rgba(35, 52, 42, 0.6);
  margin-top: 0;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.stat-card-total .stat-card-value { color: #1a3a28; }
.stat-card-success .stat-card-value { color: #166534; }
.stat-card-charging .stat-card-value { color: #4d4009; }
.stat-card-unused .stat-card-value { color: #1a3a28; }
.stat-card-failed .stat-card-value { color: #7f1d1d; }
.stat-card-destroyed .stat-card-value { color: #374151; }
.stat-card-amount .stat-card-value { color: #6b21a8; }
.stat-card-balance .stat-card-value { color: #134e4a; }

/* 折线图卡片 */
.stat-chart-card {
  background: linear-gradient(
    145deg,
    rgba(255, 252, 248, 0.72) 0%,
    rgba(236, 244, 238, 0.58) 45%,
    rgba(220, 232, 224, 0.52) 100%
  );
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow:
    0 2px 12px rgba(30, 48, 38, 0.08),
    0 10px 24px rgba(25, 42, 32, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
}

.stat-chart-wrap {
  width: 100%;
  height: 320px;
  position: relative;
  padding-bottom: 4px;
}

#statChartCanvas {
  width: 100% !important;
  height: 320px !important;
  display: block;
  cursor: crosshair;
}

.stat-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-chart-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a2e24;
  letter-spacing: -0.01em;
}

.stat-chart-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  transition: opacity 0.15s;
  letter-spacing: 0.01em;
}

.legend-swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(30, 48, 38, 0.15);
}

.legend-total .legend-swatch { background: #3d5a4a; }
.legend-success .legend-swatch { background: #40916c; }
.legend-charging .legend-swatch { background: #7d8f3f; }
.legend-unused .legend-swatch { background: #6b9080; }
.legend-failed .legend-swatch { background: #b85555; }
.legend-destroyed .legend-swatch { background: #6b7280; }

.legend-item:hover { opacity: 0.75; }

/* 详细数据表格 */
.stat-table-card {
  background: linear-gradient(
    145deg,
    rgba(255, 252, 248, 0.72) 0%,
    rgba(236, 244, 238, 0.58) 45%,
    rgba(220, 232, 224, 0.52) 100%
  );
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow:
    0 2px 12px rgba(30, 48, 38, 0.08),
    0 10px 24px rgba(25, 42, 32, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
}

/* 任务统计卡片 */
.task-stat-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
  align-items: stretch;
}

.task-stat-cards .task-stat-card {
  background: linear-gradient(
    145deg,
    rgba(255, 252, 248, 0.72) 0%,
    rgba(236, 244, 238, 0.58) 45%,
    rgba(220, 232, 224, 0.52) 100%
  );
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  min-height: 92px;
  box-shadow:
    0 2px 12px rgba(30, 48, 38, 0.08),
    0 10px 24px rgba(25, 42, 32, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.task-stat-cards .task-stat-card:hover {
  box-shadow:
    0 4px 18px rgba(30, 48, 38, 0.12),
    0 14px 32px rgba(25, 42, 32, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.65);
}

.task-stat-cards .task-stat-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 12px rgba(35, 55, 45, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.task-stat-cards .task-stat-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}

.task-stat-card--total .task-stat-icon {
  background: linear-gradient(145deg, #3d5a4a 0%, #5c7d6a 55%, #6b9080 100%);
}

.task-stat-card--success .task-stat-icon {
  background: linear-gradient(145deg, #2d6a4f 0%, #40916c 55%, #52b788 100%);
}

.task-stat-card--failed .task-stat-icon {
  background: linear-gradient(145deg, #7a3030 0%, #9e4040 55%, #b85555 100%);
}

.task-stat-card--running .task-stat-icon {
  background: linear-gradient(145deg, #5c6e2f 0%, #7d8f3f 55%, #9ab054 100%);
}

.task-stat-cards .task-stat-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 6px;
}

.task-stat-cards .task-stat-value {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-mono, ui-monospace, monospace);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #1a2e24;
}

.task-stat-card--success .task-stat-value { color: #166534; }
.task-stat-card--failed .task-stat-value { color: #7f1d1d; }
.task-stat-card--running .task-stat-value { color: #4d4009; }

.task-stat-cards .task-stat-label {
  font-size: 12px;
  color: rgba(35, 52, 42, 0.6);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

@media (max-width: 1100px) {
  .stat-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .stat-cards-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .stat-cards-grid .stat-card { min-height: 0; padding: 14px 16px; }
  .stat-cards-grid .stat-card-icon { width: 46px; height: 46px; border-radius: 12px; }
  .stat-cards-grid .stat-card-icon svg { width: 22px; height: 22px; }
  .stat-cards-grid .stat-card-value { font-size: 20px; }
  .stat-range-bar { flex-direction: column; align-items: flex-start; }
  .stat-custom-range { margin-left: 0; }
}

/* ========== 创建区项目选择 ========== */
.create-project-section {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}
.create-project-section .form-field {
  max-width: 480px;
}

/* ---------- 项目编辑弹窗样式 ---------- */
.project-modal-overlay {
  z-index: 10000;
}

.project-modal-overlay.project-modal-open {
  position: fixed;
  inset: 0;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal.project-modal {
  max-width: 720px;
  width: 100%;
  padding: 0;
  overflow: visible;
  margin: 0 auto;
}

.project-modal__header {
  align-items: flex-start;
  gap: 16px;
  margin: 0;
  padding: 24px 24px 18px;
  background: linear-gradient(165deg, rgba(61, 90, 74, 0.08) 0%, transparent 55%);
  border-bottom: 1px solid var(--border-subtle);
}

.project-modal__head-text {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.project-modal__icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(61, 90, 74, 0.12) 0%, rgba(61, 90, 74, 0.06) 100%);
  border: 1px solid rgba(61, 90, 74, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-primary);
}

.project-modal__body {
  padding: 20px 24px;
  max-height: 60vh;
  overflow-y: auto;
}

.project-modal__body .form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.project-modal__body .form-field {
  margin-bottom: 4px;
}

.project-modal__body .form-hint {
  margin-top: 4px;
  font-size: 11px;
}

.project-modal__footer {
  margin: 0;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.project-modal__close {
  flex-shrink: 0;
  margin-top: 2px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  font-size: 15px;
  transition: all var(--transition);
}

.project-modal__close:hover {
  background: var(--bg-card);
  border-color: var(--border-accent);
  color: var(--text-primary);
}

/* ---------- 图片上传组件样式 ---------- */
.image-upload-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.image-upload-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.image-upload-input-row .form-input {
  flex: 1;
}

.image-upload-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.image-preview {
  position: relative;
  max-width: 200px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.image-preview img {
  width: 100%;
  height: auto;
  display: block;
}

.image-preview-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.2s;
}

.image-preview-remove:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* 订单明细状态框样式 - 带边框色块 */
.status-box {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid;
}
.status-ok-box {
  color: #15803d;
  background: #f0fdf4;
  border-color: #86efac;
}
.status-charging-box {
  color: #a16207;
  background: #fefce8;
  border-color: #fde047;
}
.status-error-box {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fca5a5;
}
.status-neutral-box {
  color: #6b7280;
  background: #f9fafb;
  border-color: #d1d5db;
}

/* 齿轮菜单按钮 */
.gear-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gear-menu-btn {
  padding: 14px 20px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

/* 卡密生成结果 */
.cg-result-textarea {
  font-family: ui-monospace, 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  resize: vertical;
  word-break: break-all;
}
