/* Tailwind CSS CDN */
@import url('https://cdn.bootcdn.net/ajax/libs/tailwindcss/2.2.19/tailwind.min.css');
/* Inter字体使用系统本地字体或回退到系统UI字体，无需外部CDN */

/* ============================================================
   速店云SaaS - 多主题后台系统（参考UI/index.html重构）
   ============================================================ */

/* ====== 默认主题：哑光白（唯一主题，不再提供切换） ====== */
:root {
  --bg: linear-gradient(145deg, #f8fafc 0%, #eef2ff 55%, #e0f2fe 100%);
  --panel: rgba(15, 23, 42, 0.06);
  --panel-2: rgba(15, 23, 42, 0.04);
  --line: rgba(15, 23, 42, 0.14);
  --text: rgba(15, 23, 42, 0.92);
  --muted: rgba(15, 23, 42, 0.62);
  --accent: #2563eb;
  --accent-2: #0ea5e9;
  --accent-soft: rgba(37, 99, 235, 0.45);
  --title-color: #1d4ed8;
  --info: #0284c7;
  --success: #16a34a;
  --warn: #ca8a04;
  --danger: #dc2626;
  --metric-bg: rgba(37, 99, 235, 0.1);
  --progress-start: #2563eb;
  --progress-end: #0ea5e9;
  --brand-shadow: rgba(37, 99, 235, 0.25);
}

/* ====== 全局基础 ====== */
body.admin-theme {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
  position: relative;
  padding: 14px;
}

/* 背景气泡动画 */
.bg-bubbles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.bg-bubbles span {
  position: absolute;
  display: block;
  width: 20px; height: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  bottom: -150px;
  animation: rise 20s infinite ease-in;
}
.bg-bubbles span:nth-child(1) { width: 80px; height: 80px; left: 6%; animation-duration: 16s; }
.bg-bubbles span:nth-child(2) { width: 42px; height: 42px; left: 20%; animation-duration: 20s; animation-delay: 2s; }
.bg-bubbles span:nth-child(3) { width: 95px; height: 95px; left: 35%; animation-duration: 18s; animation-delay: 4s; }
.bg-bubbles span:nth-child(4) { width: 55px; height: 55px; left: 50%; animation-duration: 22s; animation-delay: 1s; }
.bg-bubbles span:nth-child(5) { width: 70px; height: 70px; left: 68%; animation-duration: 14s; animation-delay: 3s; }
.bg-bubbles span:nth-child(6) { width: 48px; height: 48px; left: 82%; animation-duration: 24s; animation-delay: 6s; }
@keyframes rise {
  0% { bottom: -150px; transform: translateX(0) rotate(0deg); opacity: 0.4; }
  50% { opacity: 0.15; }
  100% { bottom: 110vh; transform: translateX(70px) rotate(720deg); opacity: 0; }
}

/* ====== Shell 外壳 ====== */
.admin-shell {
  position: relative;
  z-index: 1;
  height: calc(100vh - 28px);
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  transition: grid-template-columns 0.28s ease;
  overflow: hidden;
}
.admin-shell.has-submenu {
  grid-template-columns: 210px 190px minmax(0, 1fr);
}

/* ====== 左侧边栏 ====== */
.left-sidebar {
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.brand-dot {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 18px var(--brand-shadow);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.brand h1 { font-size: 15px; font-weight: 700; color: var(--text); }
.brand p { font-size: 11px; color: var(--muted); }

.menu-title {
  margin: 8px 8px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: var(--muted);
}

/* 主菜单按钮 */
.primary-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0 4px;
}

.primary-btn {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  opacity: 0.78;
  border-radius: 12px;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.22s ease;
  text-decoration: none;
  gap: 8px;
}
.primary-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  opacity: 1;
  color: var(--text);
}
.primary-btn.active {
  opacity: 1;
  color: var(--text);
  border-color: var(--accent-soft);
  background: linear-gradient(135deg, rgba(127, 141, 255, 0.35), rgba(118, 75, 162, 0.25));
  box-shadow: 0 8px 20px rgba(127, 141, 255, 0.35);
}

/* 用户信息 */
.user-profile {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600; color: #fff;
  flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--muted); }

/* ====== 二级侧边栏 ====== */
.sub-sidebar {
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  width: 190px;
  padding: 18px 10px;
  overflow: hidden;
}
.sub-header {
  padding: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.sub-header h3 { font-size: 14px; margin-bottom: 4px; color: var(--text); font-weight: 600; }
.sub-header p { font-size: 11px; color: var(--muted); }
.sub-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sub-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 9px 10px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: block;
  text-decoration: none;
}
.sub-item:hover {
  border-color: var(--accent-soft);
  background: rgba(127, 141, 255, 0.16);
}
.sub-item.active {
  border-color: var(--accent-soft);
  background: rgba(127, 141, 255, 0.2);
}

/* ====== 主内容区（强制白色风格）====== */
.main-area {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  color: rgba(15, 23, 42, 0.92);
  border-radius: 0 20px 20px 0;
}
.main-area * { --line: rgba(15, 23, 42, 0.1); --text: rgba(15, 23, 42, 0.92); --muted: rgba(15, 23, 42, 0.55); --panel: rgba(15, 23, 42, 0.04); --panel-2: rgba(15, 23, 42, 0.03); --accent: #01C260; --accent-2: #6366f1; --accent-soft: rgba(79, 70, 229, 0.3); --title-color: #1e1b4b; --info: #0284c7; --success: #16a34a; --warn: #ca8a04; --danger: #dc2626; --metric-bg: rgba(79, 70, 229, 0.06); --progress-start: #4f46e5; --progress-end: #818cf8; --brand-shadow: rgba(79, 70, 229, 0.2); }

/* 顶栏 */
.topbar {
  height: 72px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  background: #ffffff;
  flex-shrink: 0;
}
.topbar h2 { font-size: 20px; color: rgba(15, 23, 42, 0.92); font-weight: 700; }
.topbar p { font-size: 12px; color: rgba(15, 23, 42, 0.55); margin-top: 3px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.clock { color: var(--info); font-size: 14px; font-weight: 600; letter-spacing: 0.2px; }

/* 内容区 */
.content-area {
  flex: 1;
  overflow: auto;
  padding: 16px;
  background: #f8f9fc;
}

/* 页脚 */
.main-footer {
  padding: 12px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  flex-shrink: 0;
}
.footer-copyright { font-size: 12px; color: rgba(15, 23, 42, 0.55); }

/* ====== 通用卡片 ====== */
.ui-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
  padding: 14px;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}
.ui-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }

.ui-card-title {
  font-size: 14px;
  color: var(--title-color);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

/* ====== 数据指标 ====== */
.metric-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.metric {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: var(--metric-bg);
  padding: 8px;
  text-align: center;
  overflow: hidden;
  flex: 1 1 calc(50% - 4px);
  min-width: 0;
}
.metric strong { display: block; font-size: clamp(14px, 1.2vw, 18px); color: var(--success); margin-bottom: 1px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric span { font-size: 11px; color: var(--muted); }

/* ====== 状态块 ====== */
.status-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.status {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.02);
  padding: 10px;
  text-align: center;
}
.status strong { display: block; font-size: 20px; margin-bottom: 3px; }
.status span { font-size: 12px; color: var(--muted); }
.status.pending strong { color: var(--info); }
.status.processing strong { color: var(--warn); }
.status.done strong { color: var(--success); }
.status.error strong { color: var(--danger); }

/* ====== 进度条 ====== */
.ui-progress {
  height: 8px;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.06);
  overflow: hidden;
  margin-bottom: 7px;
}
.ui-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--progress-start), var(--progress-end));
  border-radius: 99px;
}

/* ====== 警告提示 ====== */
.ui-alert {
  margin-top: 8px;
  border: 1px solid rgba(255, 59, 48, 0.55);
  background: rgba(255, 59, 48, 0.22);
  border-radius: 10px;
  padding: 10px;
  color: rgba(255, 59, 48, 0.85);
  font-size: 12px;
  font-weight: 600;
}

/* ====== 日志列表 ====== */
.log-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.log-item {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.02);
  border-left: 3px solid var(--accent);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.log-item.info { border-left-color: var(--info); }
.log-item.success { border-left-color: var(--success); }
.log-item.warn { border-left-color: var(--warn); }
.log-item.error { border-left-color: var(--danger); }
.log-time { color: var(--muted); font-size: 11px; }
.log-message { color: var(--text); flex: 1; margin-left: 10px; }

/* ====== 按钮 ====== */
.ui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  outline: none;
  text-decoration: none;
}
.ui-btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 4px 16px var(--brand-shadow);
}
.ui-btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}
.ui-btn-outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}
.ui-btn-outline:hover {
  border-color: var(--accent-soft);
  background: rgba(127, 141, 255, 0.1);
}
.ui-btn-danger {
  background: rgba(255, 59, 48, 0.15);
  color: var(--danger);
  border: 1px solid rgba(255, 59, 48, 0.3);
}
.ui-btn-danger:hover {
  background: rgba(255, 59, 48, 0.25);
}
.ui-btn-sm { padding: 6px 10px; font-size: 12px; }

/* ====== 表单 ====== */
.ui-input {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  color: rgba(15, 23, 42, 0.88);
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
}
.ui-input:focus {
  border-color: rgba(79, 70, 229, 0.5);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}
.ui-input::placeholder { color: rgba(15, 23, 42, 0.4); }

/* ====== 表格 ====== */
.ui-table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
}
.ui-table { width: 100%; border-collapse: collapse; }
.ui-table th {
  background: rgba(15, 23, 42, 0.03);
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  white-space: nowrap;
}
.ui-table td {
  padding: 10px 14px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}
.ui-table tr:hover td {
  background: rgba(79, 70, 229, 0.03);
}
.ui-table tr:last-child td { border-bottom: none; }

/* ====== 徽标 ====== */
.ui-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 99px;
}
.ui-badge-success { background: rgba(0, 255, 136, 0.12); color: var(--success); }
.ui-badge-warning { background: rgba(255, 204, 0, 0.12); color: var(--warn); }
.ui-badge-danger  { background: rgba(255, 59, 48, 0.12);  color: var(--danger); }
.ui-badge-info    { background: rgba(0, 212, 255, 0.12); color: var(--info); }
.ui-badge-gray    { background: rgba(15, 23, 42, 0.06); color: var(--muted); }

/* ====== 滚动条 ====== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 42, 0.2); }

/* ====== 响应式 ====== */
@media (max-width: 1100px) {
  .admin-shell { grid-template-columns: 180px minmax(0, 1fr); }
  .admin-shell.has-submenu { grid-template-columns: 180px 160px minmax(0, 1fr); }
}

@media (max-width: 900px) {
  body.admin-theme { padding: 8px; }
  .admin-shell, .admin-shell.has-submenu { grid-template-columns: 1fr; }
  .left-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--line);
    max-height: 200px;
  }
  .sub-sidebar { display: none; }
  .topbar { height: auto; padding: 12px; flex-direction: column; gap: 8px; align-items: flex-start; }
  .topbar-right { width: 100%; justify-content: space-between; }
}

/* ============================================================
   兼容层：旧类名自动适配暗色主题
   ============================================================ */

/* 表单输入框 */
.form-input,
.admin-theme select,
.admin-theme textarea {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  color: rgba(15, 23, 42, 0.88);
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
}
.form-input:focus,
.admin-theme select:focus,
.admin-theme textarea:focus {
  border-color: rgba(79, 70, 229, 0.5);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}
.form-input::placeholder { color: rgba(15, 23, 42, 0.4); }
.admin-theme select option { background: #ffffff; color: rgba(15, 23, 42, 0.88); }

/* 旧按钮系统 → 新按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; font-size: 13px; font-weight: 500; border-radius: 12px; transition: all 0.2s ease; cursor: pointer; border: none; outline: none; text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 4px 16px var(--brand-shadow); }
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.1); }
.btn-outline { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-outline:hover { border-color: var(--accent-soft); background: rgba(127, 141, 255, 0.1); }
.btn-danger { background: rgba(255, 59, 48, 0.15); color: var(--danger); border: 1px solid rgba(255, 59, 48, 0.3); }
.btn-danger:hover { background: rgba(255, 59, 48, 0.25); }
.btn-success { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 4px 16px var(--brand-shadow); }
.btn-success:hover { transform: translateY(-1px); filter: brightness(1.1); }
.btn-sm { padding: 6px 10px; font-size: 12px; }

/* 旧徽章 → 新徽章 */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; font-size: 11px; font-weight: 600; border-radius: 99px; }
.badge-success { background: rgba(0, 255, 136, 0.12); color: var(--success); }
.badge-warning { background: rgba(255, 204, 0, 0.12); color: var(--warn); }
.badge-danger  { background: rgba(255, 59, 48, 0.12);  color: var(--danger); }
.badge-info    { background: rgba(0, 212, 255, 0.12); color: var(--info); }
.badge-gray    { background: rgba(15, 23, 42, 0.06); color: var(--muted); }

/* 旧表格 → 新表格 */
.table-container { overflow-x: auto; border-radius: 16px; border: 1px solid rgba(15, 23, 42, 0.08); background: #ffffff; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: rgba(15, 23, 42, 0.03); padding: 10px 14px; text-align: left; font-size: 12px; font-weight: 600; color: rgba(15, 23, 42, 0.55); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid rgba(15, 23, 42, 0.08); white-space: nowrap; }
.data-table td { padding: 10px 14px; font-size: 13px; color: rgba(15, 23, 42, 0.85); border-bottom: 1px solid rgba(15, 23, 42, 0.05); }
.data-table tr:hover td { background: rgba(79, 70, 229, 0.03); }
.data-table tr:last-child td { border-bottom: none; }

/* 旧卡片悬停 */
.card-hover { transition: transform 0.24s ease; }
.card-hover:hover { transform: translateY(-3px); }

/* ====== 内容区Tailwind类适配（白色风格）====== */
.admin-theme .bg-white,
.admin-theme [class*="bg-white"] {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}

.admin-theme .bg-gray-50,
.admin-theme .bg-gray-50\/50 {
  background: rgba(15, 23, 42, 0.02) !important;
}

.admin-theme .border-gray-100,
.admin-theme .border-gray-200 {
  border-color: var(--line) !important;
}

.admin-theme .divide-gray-50 > :not([hidden]) ~ :not([hidden]) {
  border-color: var(--line);
}

/* 文字颜色覆盖 */
.admin-theme .text-gray-900,
.admin-theme .text-gray-800 {
  color: rgba(15, 23, 42, 0.92) !important;
}
.admin-theme .text-gray-700,
.admin-theme .text-gray-600 {
  color: rgba(15, 23, 42, 0.78) !important;
}
.admin-theme .text-gray-500,
.admin-theme .text-gray-400,
.admin-theme .text-gray-300 {
  color: rgba(15, 23, 42, 0.55) !important;
}

/* 强调色 */
.admin-theme .text-indigo-600,
.admin-theme .text-indigo-700,
.admin-theme .text-blue-600 {
  color: #4f46e5 !important;
}

/* 表单标签 */
.admin-theme .text-gray-700.mb-1,
.admin-theme .text-gray-700.mb-1\.5 {
  color: rgba(15, 23, 42, 0.78) !important;
}

/* 成功/错误/警告提示框 */
.admin-theme .bg-green-50 { background: rgba(0, 255, 136, 0.08) !important; border-color: rgba(0, 255, 136, 0.2) !important; }
.admin-theme .text-green-700, .admin-theme .text-green-600 { color: var(--success) !important; }
.admin-theme .bg-red-50 { background: rgba(255, 59, 48, 0.08) !important; border-color: rgba(255, 59, 48, 0.2) !important; }
.admin-theme .text-red-700, .admin-theme .text-red-600 { color: var(--danger) !important; }
.admin-theme .bg-amber-50 { background: rgba(255, 204, 0, 0.08) !important; border-color: rgba(255, 204, 0, 0.2) !important; }
.admin-theme .text-amber-800, .admin-theme .text-amber-700, .admin-theme .text-amber-600 { color: var(--warn) !important; }
.admin-theme .bg-indigo-50 { background: var(--metric-bg) !important; }

/* 特殊：indigo/amber/green/purple-50背景的图标容器 */
.admin-theme .bg-indigo-50 { background: rgba(127, 141, 255, 0.12) !important; }
.admin-theme .bg-green-50.rounded { background: rgba(0, 255, 136, 0.12) !important; }
.admin-theme .bg-amber-50.rounded { background: rgba(255, 204, 0, 0.12) !important; }
.admin-theme .bg-purple-50 { background: rgba(139, 92, 246, 0.12) !important; }
.admin-theme .bg-blue-50 { background: rgba(59, 130, 246, 0.12) !important; }

/* 绿色/蓝色/琥珀色/紫色图标文字 */
.admin-theme .text-green-600 { color: var(--success) !important; }
.admin-theme .text-blue-600, .admin-theme .text-blue-500 { color: var(--info) !important; }
.admin-theme .text-amber-600 { color: var(--warn) !important; }
.admin-theme .text-purple-600 { color: #a78bfa !important; }

/* 分隔线 */
.admin-theme .border-t.border-gray-100,
.admin-theme .border-b.border-gray-100 {
  border-color: var(--line) !important;
}

/* hover效果 */
.admin-theme .hover\:bg-gray-50\/50:hover,
.admin-theme .hover\:bg-gray-50:hover,
.admin-theme .hover\:bg-indigo-100:hover,
.admin-theme .hover\:bg-green-100:hover,
.admin-theme .hover\:bg-amber-100:hover,
.admin-theme .hover\:bg-purple-100:hover,
.admin-theme .group-hover\:bg-indigo-100:hover,
.admin-theme .group-hover\:bg-green-100:hover,
.admin-theme .group-hover\:bg-amber-100:hover,
.admin-theme .group-hover\:bg-purple-100:hover {
  background: rgba(127, 141, 255, 0.08) !important;
}

/* 旧hover文字色 */
.admin-theme .hover\:text-indigo-800:hover,
.admin-theme .hover\:text-gray-700:hover {
  color: var(--accent) !important;
}

/* 弹窗背景 */
.admin-theme .bg-black\/50 { background: rgba(0, 0, 0, 0.5) !important; }

/* 弹窗内白色卡片 */
.admin-theme .shadow-2xl.bg-white {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* 筛选按钮 */
.admin-theme .bg-indigo-600 {
  background: linear-gradient(135deg, #4f46e5, #6366f1) !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* 滚动行 */
.admin-theme .hover\:bg-gray-50\/50 {
  transition: background 0.15s ease;
}


/* 渐变头部保持原色 */
.admin-theme .bg-gradient-to-r.from-indigo-500,
.admin-theme .bg-gradient-to-br.from-indigo-500 {
  border-radius: 16px 16px 0 0;
}

/* ====== 登录页样式 ====== */
.login-bg {
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
  background: #08111f;
  color: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.login-slideshow {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(115deg, rgba(8, 17, 31, 0.92) 0%, rgba(15, 23, 42, 0.78) 43%, rgba(12, 74, 110, 0.62) 100%),
    linear-gradient(22deg, rgba(20, 184, 166, 0.28), transparent 44%),
    linear-gradient(155deg, transparent 40%, rgba(245, 158, 11, 0.2) 100%);
}
.login-slide {
  position: absolute;
  inset: -10%;
  opacity: 0.38;
  background-size: 42px 42px, 100% 100%;
  transform: rotate(-8deg) scale(1.08);
}
.login-slide-1 {
  background-image:
    linear-gradient(rgba(255,255,255,.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.075) 1px, transparent 1px);
}
.login-slide-2 {
  opacity: 0.2;
  background:
    repeating-linear-gradient(120deg, transparent 0 26px, rgba(255,255,255,.08) 27px 28px);
  animation: loginDrift 18s ease-in-out infinite alternate;
}
.login-slide-3,
.login-slide-4 {
  display: none;
}
@keyframes loginDrift {
  from { transform: translate3d(-18px, -8px, 0) rotate(-8deg) scale(1.08); }
  to { transform: translate3d(18px, 8px, 0) rotate(-8deg) scale(1.08); }
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(8, 17, 31, 0.18) 0%, rgba(8, 17, 31, 0.52) 100%),
    linear-gradient(180deg, rgba(255,255,255,.04) 0%, rgba(0,0,0,.18) 100%);
}

.login-shell {
  position: relative;
  z-index: 2;
  width: min(1040px, 100%);
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.34);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(26px) saturate(1.2);
  -webkit-backdrop-filter: blur(26px) saturate(1.2);
}

.login-hero-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: 42px;
  overflow: hidden;
}
.login-hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(140deg, rgba(14, 165, 233, 0.16), transparent 48%),
    linear-gradient(28deg, rgba(20, 184, 166, 0.16), rgba(245, 158, 11, 0.1));
  pointer-events: none;
}
.login-hero-panel > * {
  position: relative;
  z-index: 1;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.login-brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0ea5e9, #14b8a6 58%, #f59e0b);
  box-shadow: 0 16px 34px rgba(14, 165, 233, 0.32);
  flex-shrink: 0;
}
.login-brand-kicker {
  margin: 0 0 4px;
  color: rgba(226, 232, 240, 0.58);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
}
.login-brand h1 {
  margin: 0;
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}

.login-hero-copy {
  max-width: 520px;
}
.login-pill,
.login-form-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.14);
  color: #bae6fd;
  font-size: 12px;
  font-weight: 700;
}
.login-hero-copy h2 {
  margin: 18px 0 14px;
  max-width: 560px;
  color: #ffffff;
  font-size: 42px;
  font-weight: 800;
  line-height: 1.16;
}
.login-hero-copy p {
  max-width: 500px;
  color: rgba(226, 232, 240, 0.76);
  font-size: 16px;
  line-height: 1.8;
}

.login-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.login-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
}
.login-feature > div {
  min-width: 0;
}
.login-feature-icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.login-feature-icon svg {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 5px 8px rgba(2, 6, 23, 0.18));
}
.login-feature strong,
.login-feature span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.login-feature strong {
  color: #fff;
  font-size: 14px;
  margin-bottom: 2px;
}
.login-feature span {
  color: rgba(226, 232, 240, 0.58);
  font-size: 12px;
}

.login-visual {
  width: min(420px, 88%);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.login-visual-top {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.login-visual-top span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
}
.login-visual-row {
  height: 10px;
  width: 78%;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.18);
}
.login-visual-row.is-strong {
  width: 56%;
  background: linear-gradient(90deg, #22d3ee, #34d399);
}
.login-visual-row.is-short {
  width: 44%;
}
.login-visual-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.login-visual-metrics i {
  display: block;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.07));
}

.login-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px;
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
}
.login-form-head {
  margin-bottom: 28px;
}
.login-form-badge {
  border-color: rgba(20, 184, 166, 0.24);
  background: rgba(20, 184, 166, 0.1);
  color: #0f766e;
}
.login-form-head h2 {
  margin: 14px 0 8px;
  color: #0f172a;
  font-size: 30px;
  font-weight: 800;
}
.login-form-head p {
  color: rgba(15, 23, 42, 0.56);
  font-size: 14px;
}

.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 14px;
  background: #fff1f2;
  color: #be123c;
  font-size: 14px;
  line-height: 1.5;
}
.login-alert svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.login-field {
  display: block;
}
.login-field > span {
  display: block;
  margin-bottom: 8px;
  color: rgba(15, 23, 42, 0.72);
  font-size: 13px;
  font-weight: 700;
}
.login-input-wrap {
  position: relative;
}
.login-input-wrap svg {
  position: absolute;
  left: 15px;
  top: 50%;
  width: 19px;
  height: 19px;
  color: rgba(15, 23, 42, 0.38);
  transform: translateY(-50%);
  pointer-events: none;
}
.login-input {
  display: block;
  width: 100%;
  height: 50px;
  padding: 0 16px 0 46px;
  font-size: 15px;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.login-input:focus {
  border-color: rgba(14, 165, 233, 0.7);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}
.login-input::placeholder {
  color: rgba(15, 23, 42, 0.34);
}

.login-btn {
  display: inline-flex;
  width: 100%;
  height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #0284c7, #14b8a6);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(20, 184, 166, 0.26);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.login-btn svg {
  width: 19px;
  height: 19px;
  transition: transform 0.2s ease;
}
.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(14, 165, 233, 0.3);
  filter: brightness(1.04);
}
.login-btn:hover svg {
  transform: translateX(3px);
}
.login-btn:active {
  transform: translateY(0);
}

.login-footer-note {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 30px;
  color: rgba(15, 23, 42, 0.42);
  font-size: 12px;
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .login-hero-panel {
    padding: 30px;
  }
  .login-hero-copy h2 {
    font-size: 32px;
  }
  .login-feature-grid {
    grid-template-columns: 1fr;
  }
  .login-visual {
    display: none;
  }
  .login-form-panel {
    padding: 30px;
  }
}

@media (max-height: 720px) and (min-width: 901px) {
  .login-bg {
    align-items: flex-start;
  }
  .login-shell {
    min-height: auto;
  }
}

@media (max-width: 520px) {
  .login-bg {
    align-items: flex-start;
    padding: 14px !important;
  }
  .login-shell {
    border-radius: 22px;
  }
  .login-hero-panel,
  .login-form-panel {
    padding: 24px 20px;
  }
  .login-brand h1 {
    font-size: 24px;
  }
  .login-brand-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
  }
  .login-hero-copy h2 {
    font-size: 28px;
  }
  .login-hero-copy p {
    font-size: 14px;
  }
  .login-form-head h2 {
    font-size: 26px;
  }
  .login-footer-note {
    flex-direction: column;
    gap: 6px;
  }
}

/* gradient-primary 保留 */
.gradient-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
