/* ==========================================================================
   eloro 管理后台 · Design System v3
   风格：暖纸质感 + 深墨侧栏 + 珊瑚橙品牌强调（brand-themed / business-intl）
   ========================================================================== */

/* ===== 1. Design Tokens ===== */
:root {
  /* Brand — 珊瑚橙（eloro 主色） */
  --color-primary-50: #FFF7ED;
  --color-primary-100: #FFEDD5;
  --color-primary-200: #FED7AA;
  --color-primary-300: #FDBA74;
  --color-primary-400: #FB923C;
  --color-primary-500: #F97316;
  --color-primary-600: #EA580C;
  --color-primary-700: #C2410C;
  --color-primary-800: #9A3412;
  --color-primary-900: #7C2D12;
  --color-primary-rgb: 249, 115, 22;

  /* Accent — 青绿（学习 / 成长语义） */
  --color-accent-50: #F0FDFA;
  --color-accent-100: #CCFBF1;
  --color-accent-500: #14B8A6;
  --color-accent-600: #0D9488;
  --color-accent-700: #0F766E;

  /* Warm Neutral（暖纸灰阶） */
  --color-gray-50: #FBF8F3;
  --color-gray-100: #F5EFE7;
  --color-gray-200: #EBE3D9;
  --color-gray-300: #DED2C2;
  --color-gray-400: #A79A8C;
  --color-gray-500: #7A6B5D;
  --color-gray-600: #5E5044;
  --color-gray-700: #4A3F35;
  --color-gray-800: #33291F;
  --color-gray-900: #241C16;
  --color-white: #FFFFFF;

  /* Status */
  --state-success: #16A34A;
  --state-success-light: #ECFDF3;
  --state-success-dark: #15803D;
  --state-warning: #D97706;
  --state-warning-light: #FFF7E6;
  --state-error: #DC2626;
  --state-error-light: #FEF2F2;
  --state-error-dark: #B91C1C;
  --state-info: #0D9488;
  --state-info-light: #F0FDFA;
  --color-error: var(--state-error);

  /* Sidebar */
  --sidebar-bg: #1E1713;
  --sidebar-text: #C4B5A6;
  --sidebar-hover: rgba(255, 255, 255, 0.055);
  --sidebar-active: #F97316;
  --sidebar-active-text: #FFF7ED;
  --sidebar-width: 248px;

  /* Layout */
  --bg-page: #F7F3EC;
  --bg-card: #FFFFFF;
  --bg-header: rgba(255, 255, 255, 0.86);
  --border: #EBE3D9;
  --border-strong: #DED2C2;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 20px;
  --border-radius-full: 9999px;
  /* 兼容别名（JS 内联样式使用） */
  --radius-sm: var(--border-radius-sm);
  --radius-md: var(--border-radius-md);
  --radius-lg: var(--border-radius-lg);
  --radius-full: var(--border-radius-full);

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(36, 28, 22, 0.04), 0 1px 3px rgba(36, 28, 22, 0.03);
  --shadow-md: 0 4px 12px -2px rgba(36, 28, 22, 0.08), 0 2px 6px -2px rgba(36, 28, 22, 0.04);
  --shadow-lg: 0 16px 40px -12px rgba(36, 28, 22, 0.14), 0 8px 16px -8px rgba(36, 28, 22, 0.06);
  --shadow-focus: 0 0 0 3px rgba(var(--color-primary-rgb), 0.22);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
    "Hiragino Sans GB", "Source Han Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-display: "PingFang SC", "HarmonyOS Sans SC", "Source Han Sans SC",
    "Microsoft YaHei", -apple-system, sans-serif;
  --font-num: "DIN Alternate", "Bahnschrift", "SF Pro Display", -apple-system, "PingFang SC", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Fira Code", Consolas, monospace;
  --text-xs: 0.75rem;    /* 12 */
  --text-sm: 0.8125rem;  /* 13 */
  --text-base: 0.875rem; /* 14 */
  --text-md: 1rem;       /* 16 */
  --text-lg: 1.125rem;   /* 18 */
  --text-xl: 1.25rem;    /* 20 */
  --text-2xl: 1.375rem;  /* 22 */
  --text-3xl: 1.75rem;   /* 28 */
  --text-4xl: 2.125rem;  /* 34 */
  --leading-tight: 1.28;
  --leading-normal: 1.55;
  --leading-relaxed: 1.7;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Spacing（4px 基准） */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 40px;
  --space-3xl: 48px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 0.8, 0.3, 1);
  --dur-fast: 0.15s;
  --dur-base: 0.22s;
}

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

html, body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--leading-normal);
  color: var(--color-gray-900);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* 暖纸背景：顶部极淡光晕，避免大面积平涂 */
body {
  background-image:
    radial-gradient(900px 420px at 78% -140px, rgba(var(--color-primary-rgb), 0.10), transparent 62%),
    radial-gradient(700px 360px at 8% -120px, rgba(20, 184, 166, 0.07), transparent 60%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

a { text-decoration: none; color: inherit; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

input, select, textarea { font-family: inherit; font-size: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

::selection { background: rgba(var(--color-primary-rgb), 0.18); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(122, 107, 93, 0.28);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(122, 107, 93, 0.45); background-clip: padding-box; }

/* ===== 3. App Layout ===== */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: linear-gradient(180deg, #241B16 0%, #1A1310 58%, #16100D 100%);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  overflow: hidden;
  transition: width 0.28s var(--ease-out), min-width 0.28s var(--ease-out), transform 0.28s var(--ease-out);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.045);
}

/* 侧栏顶部品牌柔光 */
.admin-sidebar::before {
  content: "";
  position: absolute;
  inset: -40% 30% 60% -30%;
  background: radial-gradient(closest-side, rgba(var(--color-primary-rgb), 0.22), transparent 72%);
  pointer-events: none;
}

.admin-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  transition: margin-left 0.28s var(--ease-out);
}

.admin-header {
  height: 64px;
  background: var(--bg-header);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(235, 227, 217, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-lg);
  position: sticky;
  top: 0;
  z-index: 40;
}

.admin-content {
  flex: 1;
  padding: 26px var(--space-lg) var(--space-2xl);
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  min-width: 0;
}

/* ===== 4. Sidebar ===== */
.sidebar-logo {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 64px;
  position: relative;
  z-index: 1;
}

.sidebar-logo img,
.sidebar-logo svg {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.10);
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  transition: opacity 0.2s ease;
}

.sidebar-logo-text span {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: #FFF7ED;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1.3;
}

.sidebar-logo-text small {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(196, 181, 166, 0.55);
  white-space: nowrap;
}

/* 兼容旧标记：logo 内直接 span */
.sidebar-logo > span {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: var(--font-semibold);
  color: #FFFFFF;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.sidebar-nav {
  padding: 10px 12px 16px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  z-index: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.admin-sidebar::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.admin-sidebar::-webkit-scrollbar-thumb,
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border: none;
}

/* 导航分组（可折叠） */
.nav-group { margin-bottom: 2px; }

.nav-group-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 10px 7px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(196, 181, 166, 0.5);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--dur-fast) ease;
  user-select: none;
}

.nav-group-head:hover { color: rgba(255, 247, 237, 0.8); }

.nav-group-head .nav-group-chev {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.55;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-fast) ease;
}

.nav-group-head:hover .nav-group-chev { opacity: 0.9; }

.nav-group.collapsed .nav-group-head .nav-group-chev { transform: rotate(-90deg); }

.nav-group-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  transition: opacity var(--dur-base) ease;
}

.nav-group.collapsed .nav-group-body { display: none; }

/* 兼容旧分组标签 */
.sidebar-nav-label {
  padding: 14px 10px 7px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(196, 181, 166, 0.5);
  font-weight: var(--font-semibold);
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--sidebar-text);
  font-size: var(--text-sm);
  font-weight: 450;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.sidebar-nav-item:hover {
  background: var(--sidebar-hover);
  color: #FFF7ED;
}

.sidebar-nav-item.active {
  background: linear-gradient(90deg, rgba(var(--color-primary-rgb), 0.22), rgba(var(--color-primary-rgb), 0.05));
  color: var(--sidebar-active-text);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(var(--color-primary-rgb), 0.18);
}

.sidebar-nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  border-radius: 3px;
  background: var(--sidebar-active);
  box-shadow: 0 0 12px rgba(var(--color-primary-rgb), 0.8);
}

.sidebar-nav-item .nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.66;
  transition: opacity var(--dur-fast) ease, color var(--dur-fast) ease;
}

.sidebar-nav-item:hover .nav-icon { opacity: 0.92; }
.sidebar-nav-item.active .nav-icon { opacity: 1; color: var(--color-primary-300); }

.sidebar-nav-item span {
  transition: opacity 0.2s ease;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer {
  margin-top: auto;
  padding: 10px 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 1;
}

/* 侧栏底部用户信息块 */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  margin-bottom: 8px;
}

.sidebar-user .su-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #FFF7ED;
  background: linear-gradient(135deg, #F97316, #C2410C);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.sidebar-user .su-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.sidebar-user .su-meta strong {
  font-size: 12.5px;
  font-weight: 600;
  color: #FFF7ED;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user .su-meta span {
  font-size: 10.5px;
  color: rgba(196, 181, 166, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== 5. Page Header & Breadcrumb ===== */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.page-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-gray-900);
  margin: 0 0 4px 0;
  line-height: 1.25;
}

.page-subtitle {
  font-size: var(--text-sm);
  color: var(--color-gray-500);
  margin: 0;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--color-gray-500);
}

.breadcrumb a {
  color: var(--color-gray-500);
  transition: color var(--dur-fast) ease;
}

.breadcrumb a:hover { color: var(--color-primary-600); }

.breadcrumb .separator { color: var(--color-gray-300); }

.breadcrumb .current {
  color: var(--color-gray-900);
  font-weight: var(--font-semibold);
}

/* ===== 6. Cards ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  transition: box-shadow var(--dur-base) ease, transform var(--dur-base) var(--ease-out), border-color var(--dur-base) ease;
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.card:has(.table-container) { overflow: hidden; }
.card:has(.table-container):hover { transform: none; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-gray-100);
}

.card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-gray-900);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-subtitle {
  font-size: var(--text-xs);
  color: var(--color-gray-500);
}

/* ===== 7. Stat Cards ===== */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) ease, border-color var(--dur-base) ease;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -30% -60% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--color-primary-rgb), 0.09), transparent 70%);
  pointer-events: none;
}

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

.stat-card .stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.stat-card .stat-label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-gray-500);
  margin: 0 0 6px 0;
}

.stat-card .stat-value {
  font-family: var(--font-num);
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-gray-900);
  margin: 0;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.stat-card .stat-change {
  font-size: var(--text-xs);
  margin-top: 6px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stat-card .stat-change.up { color: var(--state-success); }
.stat-card .stat-change.down { color: var(--state-error); }

.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: var(--border-radius-full);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.stat-trend.up { background: var(--state-success-light); color: var(--state-success-dark); }
.stat-trend.down { background: var(--state-error-light); color: var(--state-error); }
.stat-trend.flat { background: var(--color-gray-100); color: var(--color-gray-500); }

/* 迷你柱状趋势 */
.stat-spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 32px;
  margin-top: 12px;
}

.stat-spark i {
  flex: 1;
  border-radius: 3px 3px 2px 2px;
  background: linear-gradient(180deg, var(--color-primary-300), var(--color-primary-100));
  min-height: 4px;
  opacity: 0.9;
}

.stat-spark i:last-child {
  background: linear-gradient(180deg, var(--color-primary-500), var(--color-primary-300));
}

/* ===== 8. Tables ===== */
.table-container {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.card:has(> .table-container) { overflow: hidden; }

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-container table { table-layout: fixed; }

.table-container td.cell-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--color-gray-50);
  text-align: left;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  padding: 11px var(--space-md);
  backdrop-filter: blur(6px);
}

tbody td {
  padding: 13px var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-gray-700);
  border-bottom: 1px solid var(--color-gray-100);
  vertical-align: middle;
}

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

tbody tr { transition: background var(--dur-fast) ease; }

tbody tr:hover { background: #FCFAF6; }

tbody td:first-child, thead th:first-child { padding-left: 20px; }
tbody td:last-child, thead th:last-child { padding-right: 20px; }

/* ===== 9. Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 8px 15px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease,
    color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

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

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: linear-gradient(180deg, var(--color-primary-500), var(--color-primary-600));
  color: #FFFFFF;
  border-color: var(--color-primary-600);
  box-shadow: 0 1px 2px rgba(var(--color-primary-rgb), 0.28), 0 4px 12px -6px rgba(var(--color-primary-rgb), 0.5);
}

.btn-primary:hover {
  background: linear-gradient(180deg, var(--color-primary-400), var(--color-primary-500));
  border-color: var(--color-primary-500);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(var(--color-primary-rgb), 0.3), 0 8px 18px -8px rgba(var(--color-primary-rgb), 0.55);
}

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

.btn-secondary {
  background: var(--bg-card);
  color: var(--color-gray-700);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--color-gray-50);
  border-color: var(--border-strong);
  color: var(--color-gray-900);
}

.btn-ghost {
  background: transparent;
  color: var(--color-gray-600);
  border-color: transparent;
}

.btn-ghost:hover { background: var(--color-gray-100); color: var(--color-gray-900); }

.btn-danger {
  background: var(--state-error);
  color: #FFFFFF;
  border-color: var(--state-error);
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.24);
}

.btn-danger:hover {
  background: var(--state-error-dark);
  border-color: var(--state-error-dark);
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--color-accent-600);
  color: #FFFFFF;
  border-color: var(--color-accent-600);
}

.btn-accent:hover { background: var(--color-accent-700); border-color: var(--color-accent-700); }

.btn-sm {
  padding: 4px 10px;
  height: 28px;
  font-size: var(--text-xs);
  border-radius: 8px;
  font-weight: 500;
}

.btn-sm svg { width: 13px; height: 13px; }

.btn-lg {
  padding: 11px 22px;
  height: 44px;
  font-size: var(--text-base);
  border-radius: 12px;
}

.btn-block { width: 100%; }

/* ===== 10. Badges & Tags ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.7;
  border-radius: var(--border-radius-full);
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
  flex-shrink: 0;
}

.badge-success { background: var(--state-success-light); color: var(--state-success-dark); }
.badge-warning { background: var(--state-warning-light); color: var(--state-warning); }
.badge-error { background: var(--state-error-light); color: var(--state-error); }
.badge-info { background: var(--state-info-light); color: var(--color-accent-700); }
.badge-primary { background: var(--color-primary-50); color: var(--color-primary-700); }
.badge-neutral { background: var(--color-gray-100); color: var(--color-gray-600); }

.tag-list { display: flex; gap: 4px; flex-wrap: wrap; }

.tag-item {
  display: inline-flex;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 500;
  background: var(--color-primary-50);
  color: var(--color-primary-700);
  border-radius: var(--border-radius-full);
  border: 1px solid rgba(var(--color-primary-rgb), 0.12);
}

/* ===== 11. Forms ===== */
.form-group { margin-bottom: var(--space-md); }

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-gray-700);
  margin-bottom: 6px;
}

.form-input, .form-select, textarea.form-input {
  width: 100%;
  padding: 9px 12px;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-gray-900);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, background var(--dur-fast) ease;
  outline: none;
}

.form-input:hover, .form-select:hover { border-color: var(--border-strong); }

.form-input:focus, .form-select:focus, textarea.form-input:focus {
  border-color: var(--color-primary-400);
  box-shadow: var(--shadow-focus);
  background: #FFFFFF;
}

.form-input::placeholder { color: var(--color-gray-400); }

.form-input:disabled, .form-select:disabled {
  background: var(--color-gray-50);
  color: var(--color-gray-500);
  cursor: not-allowed;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.form-hint { font-size: var(--text-xs); color: var(--color-gray-500); margin-top: 6px; }

/* 搜索框 */
.search-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  height: 36px;
  width: 300px;
  max-width: 100%;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.search-bar:hover { border-color: var(--border-strong); }

.search-bar:focus-within {
  border-color: var(--color-primary-400);
  box-shadow: var(--shadow-focus);
}

.search-bar svg { flex-shrink: 0; color: var(--color-gray-400); }

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-gray-900);
  min-width: 0;
  height: 100%;
}

.search-bar input::placeholder { color: var(--color-gray-400); }

/* 筛选下拉 */
.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.filter-select {
  padding: 0 30px 0 12px;
  height: 36px;
  font-size: var(--text-sm);
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 10px;
  background-color: var(--bg-card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A79A8C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  color: var(--color-gray-700);
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

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

.filter-select:focus {
  border-color: var(--color-primary-400);
  box-shadow: var(--shadow-focus);
}

/* 分段筛选控件 */
.segmented {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  background: var(--color-gray-100);
  border-radius: 10px;
  gap: 2px;
}

.segmented button {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-gray-600);
  transition: all var(--dur-fast) ease;
}

.segmented button:hover { color: var(--color-gray-900); }

.segmented button.active {
  background: var(--bg-card);
  color: var(--color-gray-900);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* ===== 12. Toolbar ===== */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* ===== 13. Pagination ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 4px 4px;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.pagination-info {
  font-size: var(--text-sm);
  color: var(--color-gray-500);
  font-variant-numeric: tabular-nums;
}

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

.pagination-actions button {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  font-size: var(--text-sm);
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-card);
  color: var(--color-gray-700);
  cursor: pointer;
  transition: all var(--dur-fast) ease;
}

.pagination-actions button:hover:not(:disabled):not(.active) {
  background: var(--color-gray-50);
  border-color: var(--border-strong);
  color: var(--color-gray-900);
}

.pagination-actions button.active {
  background: linear-gradient(180deg, var(--color-primary-500), var(--color-primary-600));
  color: #FFFFFF;
  border-color: var(--color-primary-600);
  font-weight: 600;
  box-shadow: 0 2px 8px -2px rgba(var(--color-primary-rgb), 0.5);
}

.pagination-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ===== 14. Header Actions ===== */
.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-width: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-gray-500);
  cursor: pointer;
  position: relative;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}

.header-btn:hover {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--color-gray-900);
}

.header-btn .badge-dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 7px;
  height: 7px;
  background: var(--color-primary-500);
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.18);
}

.admin-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-700));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px -2px rgba(var(--color-primary-rgb), 0.6);
  transition: transform var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.admin-avatar:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px -2px rgba(var(--color-primary-rgb), 0.7);
}

/* ===== 15. Grid & Chart ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-md); }

.chart-placeholder {
  width: 100%;
  height: 240px;
  background: linear-gradient(180deg, rgba(var(--color-primary-rgb), 0.05) 0%, rgba(251, 248, 243, 0.6) 100%);
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-400);
  font-size: var(--text-sm);
  border: 1px dashed var(--color-gray-300);
  overflow: hidden;
}

.chart-placeholder.small { height: 100px; }

/* ===== 16. Login ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(720px 520px at 18% 8%, rgba(var(--color-primary-rgb), 0.28), transparent 62%),
    radial-gradient(620px 460px at 88% 92%, rgba(20, 184, 166, 0.16), transparent 60%),
    linear-gradient(150deg, #241B16 0%, #150F0C 100%);
  padding: 24px;
}

.login-card {
  background: var(--bg-card);
  border-radius: 22px;
  padding: 40px;
  width: 420px;
  max-width: 100%;
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: riseIn 0.4s var(--ease-out) both;
}

.login-logo {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.login-logo img {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

.login-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.02em;
  margin: 0 0 6px 0;
  color: var(--color-gray-900);
}

.login-subtitle {
  font-size: var(--text-sm);
  color: var(--color-gray-500);
  text-align: center;
  margin: 0 0 var(--space-xl) 0;
}

.input-wrapper { position: relative; }

.input-wrapper .input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--color-gray-400);
  pointer-events: none;
}

.form-input.with-icon { padding-left: 38px; }

.login-footer {
  text-align: center;
  margin-top: var(--space-xl);
  font-size: var(--text-xs);
  color: var(--color-gray-400);
}

/* ===== 17. Domain Components ===== */
.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.review-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }

.review-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
}

.review-meta { font-size: var(--text-xs); color: var(--color-gray-500); }

.review-actions { display: flex; gap: 6px; flex-shrink: 0; }

.book-cover-placeholder {
  width: 60px;
  height: 80px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 4px 10px -4px rgba(36, 28, 22, 0.35);
}

.book-cover-placeholder img { width: 100%; height: 100%; object-fit: cover; }

.book-name-cell { display: flex; align-items: center; gap: 12px; }
.book-title-text { color: var(--color-gray-700); font-weight: 500; }

.action-buttons { display: flex; gap: 6px; flex-wrap: nowrap; }

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 600;
  flex-shrink: 0;
}

/* 快捷操作 */
.quick-action-card {
  cursor: pointer;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) ease, border-color var(--dur-base) ease;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 16px 18px;
  position: relative;
}

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

.quick-action-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.qa-body { min-width: 0; flex: 1; }

.qa-title {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qa-desc {
  margin: 2px 0 0 0;
  font-size: 11.5px;
  color: var(--color-gray-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qa-arrow {
  color: var(--color-gray-300);
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-4px);
  transition: all var(--dur-base) var(--ease-out);
}

.quick-action-card:hover .qa-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--color-primary-500);
}

/* 动态列表 */
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--color-gray-100);
}

.activity-item:last-child { border-bottom: none; }
.activity-item:first-child { padding-top: 2px; }

/* 排行榜 */
.ranking-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 9px 0;
  border-bottom: 1px solid var(--color-gray-100);
}

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

.ranking-num {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-num);
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
}

.rank-bar {
  height: 5px;
  border-radius: 999px;
  background: var(--color-gray-100);
  overflow: hidden;
  margin-top: 6px;
}

.rank-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary-400), var(--color-primary-600));
}

/* ===== 18. Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 21, 18, 0.46);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-base) ease, visibility var(--dur-base) ease;
  padding: 20px;
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
  background: var(--bg-card);
  border-radius: 18px;
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(8px);
  transition: transform var(--dur-base) var(--ease-out);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal { transform: scale(1) translateY(0); }

.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--color-gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.modal-title {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
  margin: 0;
  color: var(--color-gray-900);
}

.modal-close {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--color-gray-500);
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
  flex-shrink: 0;
}

.modal-close:hover { background: var(--color-gray-100); color: var(--color-gray-900); }

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

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--color-gray-100);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
  background: var(--color-gray-50);
  flex-shrink: 0;
}

/* ===== 19. Toast ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-gray-900);
  animation: slideIn var(--dur-base) var(--ease-out);
  max-width: 380px;
}

.toast svg { flex-shrink: 0; }

.toast-success { border-left: 3px solid var(--state-success); }
.toast-success svg { color: var(--state-success); }
.toast-error { border-left: 3px solid var(--state-error); }
.toast-error svg { color: var(--state-error); }
.toast-warning { border-left: 3px solid var(--state-warning); }
.toast-warning svg { color: var(--state-warning); }

/* ===== 20. Empty / Loading ===== */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-md);
  color: var(--color-gray-500);
}

.empty-state svg {
  width: 56px;
  height: 56px;
  margin-bottom: var(--space-md);
  opacity: 0.45;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-md);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gray-50);
  border: 1px solid var(--border);
  color: var(--color-gray-400);
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-gray-700);
  margin: 0 0 4px 0;
}

.empty-state-desc {
  font-size: var(--text-sm);
  color: var(--color-gray-400);
  margin: 0 0 var(--space-md) 0;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-gray-200);
  border-top-color: var(--color-primary-500);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  display: inline-block;
}

.skeleton {
  background: linear-gradient(90deg, var(--color-gray-100) 25%, var(--color-gray-50) 37%, var(--color-gray-100) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 8px;
}

/* ===== 21. Mobile ===== */
.mobile-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--color-gray-700);
}

.mobile-menu-btn:hover { background: var(--color-gray-100); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 21, 18, 0.5);
  backdrop-filter: blur(2px);
  z-index: 49;
}

.sidebar-overlay.active { display: block; }

/* ===== 22. Avatars & Checkbox ===== */
.avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.avatar-md { width: 32px; height: 32px; font-size: var(--text-xs); }
.avatar-lg { width: 40px; height: 40px; font-size: var(--text-sm); }

.checkbox, .table-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1px solid var(--border-strong);
  accent-color: var(--color-primary-600);
  cursor: pointer;
}

/* ===== 23. Utilities ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }

.font-normal { font-weight: var(--font-normal); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }

.text-gray-400 { color: var(--color-gray-400); }
.text-gray-500 { color: var(--color-gray-500); }
.text-gray-600 { color: var(--color-gray-600); }
.text-gray-700 { color: var(--color-gray-700); }
.text-gray-900 { color: var(--color-gray-900); }
.text-primary { color: var(--color-primary-600); }
.text-success { color: var(--state-success); }
.text-danger { color: var(--state-error); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

.w-full { width: 100%; }
.hidden { display: none; }

.num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.divider { height: 1px; background: var(--color-gray-100); margin: var(--space-md) 0; }

/* ===== 24. Motion ===== */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideIn {
  from { transform: translateX(24px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

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

@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* 内容区载入编排：轻量 stagger */
.admin-content > * {
  animation: riseIn 0.36s var(--ease-out) both;
}

.admin-content > *:nth-child(1) { animation-delay: 0.01s; }
.admin-content > *:nth-child(2) { animation-delay: 0.05s; }
.admin-content > *:nth-child(3) { animation-delay: 0.09s; }
.admin-content > *:nth-child(4) { animation-delay: 0.13s; }
.admin-content > *:nth-child(5) { animation-delay: 0.17s; }
.admin-content > *:nth-child(6) { animation-delay: 0.21s; }
.admin-content > *:nth-child(7) { animation-delay: 0.25s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ===== 25. Responsive ===== */
@media (max-width: 1280px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .admin-content { padding: 20px 18px 32px; }
}

@media (max-width: 768px) {
  .admin-sidebar {
    width: 260px;
    min-width: 260px;
    transform: translateX(-100%);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.4);
  }

  .admin-sidebar.open { transform: translateX(0); }

  .admin-main { margin-left: 0; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }

  .mobile-menu-btn { display: flex; }

  .search-bar { width: 100%; }

  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-left, .toolbar-right { width: 100%; }

  .pagination { flex-direction: column; align-items: stretch; }
  .pagination-actions { justify-content: center; }

  .admin-header { padding: 0 var(--space-md); height: 58px; }
  .admin-content { padding: 16px 14px 28px; }

  .page-title { font-size: var(--text-xl); }

  .form-row { grid-template-columns: 1fr; }

  .modal { max-height: 92vh; }
  .modal-footer { padding: 12px 16px; }
  .modal-body { padding: 16px; }

  .toast-container { left: 14px; right: 14px; top: 14px; }
  .toast { max-width: none; }

  /* 侧栏抽屉状态下保持文字可见 */
  .sidebar-logo-text small { display: none; }
}

@media (max-width: 480px) {
  .card { padding: 16px; }
  .stat-card { padding: 16px; }
  .btn { padding: 8px 12px; }
  .page-header { align-items: flex-start; flex-direction: column; }
}
