/* ============================================================
   洗车店会员卡系统 - 公共样式
   ============================================================ */

/* CSS变量 - 主题色 */
:root {
  --primary: #1890ff;
  --primary-dark: #096dd9;
  --success: #52c41a;
  --warning: #faad14;
  --danger: #ff4d4f;
  --bg: #f0f2f5;
  --card-bg: #ffffff;
  --text: #262626;
  --text-secondary: #8c8c8c;
  --border: #e8e8e8;
  --sidebar-bg: #001529;
  --sidebar-text: #ffffffa6;
  --sidebar-active: #1890ff;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

/* 布局 */
.layout { display: flex; min-height: 100vh; }

/* 侧边栏 */
.sidebar {
  width: 220px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: width 0.3s ease, transform 0.3s ease;
}
/* 侧边栏折叠状态 */
.sidebar.collapsed {
  width: 64px;
}
.sidebar.collapsed .logo-text,
.sidebar.collapsed .menu-text,
.sidebar.collapsed .submenu {
  display: none;
}
.sidebar.collapsed .menu a {
  justify-content: center;
  padding: 12px 0;
}
.sidebar.collapsed .menu a .icon {
  margin-right: 0;
  font-size: 18px;
}
.sidebar.collapsed .logo {
  padding: 20px 0;
  font-size: 20px;
}
/* 折叠按钮 */
.sidebar-toggle {
  position: fixed;
  left: 220px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 60px;
  background: var(--sidebar-bg);
  color: #fff;
  border: none;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: left 0.3s ease;
  opacity: 0.7;
}
.sidebar-toggle:hover { opacity: 1; }
.sidebar.collapsed ~ .sidebar-toggle {
  left: 64px;
}
.sidebar .logo {
  padding: 20px;
  text-align: center;
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  border-bottom: 1px solid #ffffff1a;
}
.sidebar .menu { list-style: none; padding: 10px 0; }
.sidebar .menu li { padding: 0; }
.sidebar .menu a {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  color: var(--sidebar-text);
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}
.sidebar .menu a:hover, .sidebar .menu a.active {
  color: #fff;
  background: var(--sidebar-active);
}
.sidebar .menu a .icon { margin-right: 10px; width: 16px; text-align: center; }

/* 主内容区 */
.main {
  flex: 1;
  margin-left: 220px;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s ease;
}
.sidebar.collapsed ~ .main {
  margin-left: 64px;
}
.header {
  background: #fff;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header .store-select {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
}
.header .user-info { display: flex; align-items: center; gap: 12px; }
.header .user-info .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.content { padding: 24px; flex: 1; }

/* 卡片 */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}
.stat-card .label { color: var(--text-secondary); font-size: 13px; margin-bottom: 8px; }
.stat-card .value { font-size: 28px; font-weight: bold; color: var(--text); }
.stat-card.success { border-left-color: var(--success); }
.stat-card.warning { border-left-color: var(--warning); }
.stat-card.danger { border-left-color: var(--danger); }

/* 表格 */
.table-wrapper { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th { background: #fafafa; font-weight: 600; color: var(--text-secondary); font-size: 13px; }
tr:hover { background: #f5f5f5; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  text-decoration: none;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { opacity: 0.9; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { opacity: 0.9; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-link { border: none; background: none; color: var(--primary); padding: 4px 8px; }
.btn-link:hover { text-decoration: underline; }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text);
}
.form-group label .required { color: var(--danger); }
.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(24,144,255,0.2); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

/* 搜索栏 */
.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.search-bar .form-control { width: auto; min-width: 160px; }

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.pagination button {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
}
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }

/* 标签 */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.tag-success { background: #f6ffed; color: var(--success); border: 1px solid #b7eb8f; }
.tag-warning { background: #fffbe6; color: var(--warning); border: 1px solid #ffe58f; }
.tag-danger { background: #fff2f0; color: var(--danger); border: 1px solid #ffccc7; }
.tag-primary { background: #e6f7ff; color: var(--primary); border: 1px solid #91d5ff; }
.tag-default { background: #fafafa; color: var(--text-secondary); border: 1px solid var(--border); }

/* 模态框 */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal {
  background: #fff;
  border-radius: var(--radius);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 { font-size: 16px; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-secondary); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* 所有弹窗通用样式：自适应高度 */
.modal .form-group {
  margin-bottom: 10px;
}
.modal .form-group label {
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  display: block;
}
.modal .form-control {
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.4;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.modal .form-control:focus {
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
  outline: none;
}
.modal select.form-control {
  cursor: pointer;
  background-color: #fff;
}
.modal textarea.form-control {
  padding: 6px 10px;
  font-size: 13px;
  min-height: 50px;
  resize: vertical;
}
.modal .btn {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 4px;
  line-height: 1.4;
}
.modal .btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}
/* 两列布局 */
.modal .two-col {
  display: flex;
  gap: 12px;
}
.modal .two-col .form-group {
  flex: 1;
  min-width: 0;
}

/* 页脚（ICP备案） */
.footer {
  text-align: center;
  padding: 16px;
  color: var(--text-secondary);
  font-size: 12px;
  background: #fff;
  border-top: 1px solid var(--border);
}
.footer a { color: var(--text-secondary); text-decoration: none; }
.footer a:hover { color: var(--primary); }

/* 提示消息 */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 4px;
  color: #fff;
  z-index: 2000;
  animation: slideDown 0.3s ease;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }
@keyframes slideDown {
  from { opacity: 0; transform: translate(-50%, -20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* 空状态 */
.empty {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}

/* 登录页 */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.login-box {
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  width: 400px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.login-box h2 { text-align: center; margin-bottom: 24px; color: var(--text); }

/* 图表容器 */
.chart-container {
  width: 100%;
  height: 300px;
  position: relative;
}

/* 两列布局 */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* 详情信息 */
.detail-row {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}
.detail-row .label { width: 120px; color: var(--text-secondary); flex-shrink: 0; }
.detail-row .value { flex: 1; }

/* 地图容器 */
.map-container { width: 100%; height: 400px; border-radius: var(--radius); overflow: hidden; }

/* 响应式 */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.3s; width: 220px; }
  .sidebar.open { transform: translateX(0); }
  .sidebar.collapsed { width: 220px; transform: translateX(-100%); }
  .main { margin-left: 0 !important; }
  .sidebar-toggle { display: none; }
  .mobile-menu-btn { display: block !important; }
  .main { margin-left: 0; }
  .two-col, .three-col { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* 加载动画 */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   一级二级菜单样式
   ============================================================ */
.menu-group {
  margin-bottom: 4px;
}

.menu-group-title {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 12px 16px !important;
  color: #a0aec0 !important;
  font-weight: 500;
  transition: all 0.2s;
}

.menu-group-title:hover {
  background: rgba(255,255,255,0.05) !important;
  color: #fff !important;
}

.menu-group-title .icon {
  margin-right: 8px;
}

.menu-arrow {
  font-size: 10px;
  transition: transform 0.2s;
  margin-left: auto;
}

.menu-group.collapsed .menu-arrow {
  transform: rotate(-90deg);
}

.menu-group.collapsed .submenu {
  display: none;
}

.submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: rgba(0,0,0,0.15);
}

.submenu li a {
  padding-left: 44px !important;
  font-size: 13px;
}

.submenu li a .icon {
  font-size: 14px;
  margin-right: 6px;
}

/* ============================================================
   新布局：左侧图标导航 + 顶部标签页
   ============================================================ */
.layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* 左侧图标导航栏 */
.sidebar-icon {
  width: 70px;
  background: #1f2937;
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.logo-icon {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border-bottom: 1px solid #374151;
}

.menu-icon {
  list-style: none;
  padding: 8px 0;
  margin: 0;
  flex: 1;
  overflow-y: auto;
}

.menu-icon li a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  color: #9ca3af;
  text-decoration: none;
  font-size: 11px;
  transition: all 0.2s;
  cursor: pointer;
}

.menu-icon li a:hover {
  background: #374151;
  color: #fff;
}

.menu-icon li a.active {
  background: #1890ff;
  color: #fff;
}

.menu-icon li a .icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.menu-icon li a .text {
  font-size: 11px;
  line-height: 1.2;
}

.sidebar-logout {
  border-top: 1px solid #374151;
  padding: 8px 0;
}

.sidebar-logout a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  color: #9ca3af;
  text-decoration: none;
  font-size: 11px;
  cursor: pointer;
}

.sidebar-logout a:hover {
  background: #374151;
  color: #ff4d4f;
}

.sidebar-logout a .icon {
  font-size: 20px;
  margin-bottom: 4px;
}

/* 主区域 */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 顶部标签页栏 */
.tabs-bar {
  height: 40px;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  padding: 0 8px;
  overflow-x: auto;
  flex-shrink: 0;
}

.tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #f5f5f5;
  border: 1px solid #e8e8e8;
  border-radius: 4px 4px 0 0;
  margin-right: 4px;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  white-space: nowrap;
  height: 30px;
}

.tab:hover {
  background: #e8f4ff;
}

.tab.active {
  background: #fff;
  color: #1890ff;
  border-bottom-color: #fff;
  font-weight: 500;
}

.tab-close {
  font-size: 16px;
  color: #999;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.tab-close:hover {
  background: #ff4d4f;
  color: #fff;
}

/* 顶部工具栏 */
.header {
  height: 48px;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}

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

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

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

/* 隐藏旧布局 */
.layout-old, .sidebar, .main {
  display: none !important;
}

/* ============================================================
   可折叠一级二级侧边栏
   ============================================================ */
.sidebar-nav {
  width: 220px;
  background: #1f2937;
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  transition: width 0.3s ease;
}

/* 侧边栏自定义滚动条 */
.sidebar-nav::-webkit-scrollbar {
  width: 8px;
}
.sidebar-nav::-webkit-scrollbar-track {
  background: #1f2937;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: #6b7280;
  border-radius: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}
.sidebar-nav {
  scrollbar-width: thin;
  scrollbar-color: #6b7280 #1f2937;
}

/* 折叠状态 */
.sidebar-nav.collapsed {
  width: 64px;
}
.sidebar-nav.collapsed .logo-text,
.sidebar-nav.collapsed .nav-text,
.sidebar-nav.collapsed .nav-arrow,
.sidebar-nav.collapsed .nav-submenu,
.sidebar-nav.collapsed .sidebar-footer .nav-text {
  display: none;
}
.sidebar-nav.collapsed .sidebar-header {
  justify-content: center;
  padding: 0;
}
.sidebar-nav.collapsed .sidebar-header .toggle-btn {
  display: none;
}
.sidebar-nav.collapsed .nav-group-title {
  justify-content: center;
  padding: 12px 0;
}
.sidebar-nav.collapsed .nav-group-title .nav-icon {
  margin-right: 0;
  font-size: 18px;
}
.sidebar-nav.collapsed .sidebar-footer {
  justify-content: center;
  padding: 12px 0;
}

/* 侧边栏头部 */
.sidebar-header {
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid #374151;
  cursor: pointer;
  flex-shrink: 0;
  gap: 10px;
}

.sidebar-header .logo-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.sidebar-header .logo-text {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 1;
  flex: 1;
}

.sidebar-header .toggle-btn {
  font-size: 14px;
  color: #9ca3af;
  opacity: 1;
  flex-shrink: 0;
}

/* 导航菜单 */
.nav-menu {
  list-style: none;
  padding: 8px 0;
  margin: 0;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-group {
  margin-bottom: 2px;
}

.nav-group-title {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s;
  gap: 10px;
  white-space: nowrap;
}

.nav-group-title:hover {
  background: #374151;
  color: #fff;
}

.nav-group-title .nav-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.nav-group-title .nav-text {
  font-size: 13px;
  opacity: 1;
  flex: 1;
}

.nav-group-title .nav-arrow {
  font-size: 10px;
  opacity: 1;
  transition: all 0.2s;
  flex-shrink: 0;
}

.nav-group.open .nav-arrow {
  transform: rotate(90deg);
}

/* 二级子菜单 */
.nav-submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  background: rgba(0,0,0,0.15);
}

.nav-group.open .nav-submenu {
  max-height: 800px;
}

.nav-submenu li a {
  display: flex;
  align-items: center;
  padding: 6px 10px 6px 32px;
  color: #9ca3af;
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-submenu li a:hover {
  background: #374151;
  color: #fff;
}

.nav-submenu li a.active {
  background: #1890ff;
  color: #fff;
}

.nav-submenu li a .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6b7280;
  margin-right: 8px;
  flex-shrink: 0;
}

.nav-submenu li a.active .dot {
  background: #fff;
}

/* 收起状态下，一级菜单高亮 */
.nav-group.has-active .nav-group-title {
  color: #fff;
  background: rgba(24,144,255,0.15);
}

/* 侧边栏底部 */
.sidebar-footer {
  border-top: 1px solid #374151;
  padding: 8px 0;
  flex-shrink: 0;
}

.sidebar-footer a {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  color: #9ca3af;
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
  gap: 10px;
  transition: all 0.2s;
  white-space: nowrap;
}

.sidebar-footer a:hover {
  background: #374151;
  color: #ff4d4f;
}

.sidebar-footer .nav-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.sidebar-footer .nav-text {
  opacity: 1;
}

/* 侧边栏固定展开宽度 */

/* 隐藏旧的sidebar-icon样式 */
.sidebar-icon {
  display: none !important;
}

/* ============================================================
   v1.0.43 界面优化
   ============================================================ */

/* 按钮优化 */
.btn {
  transition: all 0.2s ease;
  border-radius: 6px;
  font-weight: 500;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.btn:active {
  transform: translateY(0);
}
.btn-primary {
  background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
  border: none;
}
.btn-success {
  background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
  border: none;
}
.btn-danger {
  background: linear-gradient(135deg, #ff4d4f 0%, #cf1322 100%);
  border: none;
}

/* 卡片优化 */
.card {
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s ease;
}
.card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.card-title {
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

/* 表单优化 */
.form-control {
  border-radius: 6px;
  border: 1px solid #d9d9d9;
  transition: all 0.2s ease;
  padding: 8px 12px;
}
.form-control:focus {
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24,144,255,0.2);
  outline: none;
}
.form-group label {
  font-weight: 500;
  color: #333;
  margin-bottom: 6px;
}

/* 表格优化 */
table {
  border-collapse: collapse;
  width: 100%;
}
thead th {
  background: #fafafa;
  font-weight: 600;
  color: #333;
  padding: 12px;
  border-bottom: 2px solid #f0f0f0;
}
tbody td {
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
}
tbody tr:hover {
  background: #fafafa;
}

/* 标签优化 */
.tag {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.tag-primary { background: #e6f7ff; color: #1890ff; }
.tag-success { background: #f6ffed; color: #52c41a; }
.tag-danger { background: #fff1f0; color: #ff4d4f; }
.tag-warning { background: #fffbe6; color: #faad14; }

/* 加载动画 */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #1890ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}
.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* 滚动条优化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f5f5f5;
}
::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* 移动端适配优化 */
@media (max-width: 768px) {
  .card {
    border-radius: 8px;
    margin: 8px;
  }
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .btn {
    padding: 10px 16px;
    font-size: 14px;
  }
  .form-control {
    padding: 10px 12px;
    font-size: 14px;
  }
}

/* 模态框优化 */
.modal-content {
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.modal-header {
  border-bottom: 1px solid #f0f0f0;
  padding: 16px 20px;
}
.modal-body {
  padding: 20px;
}
.modal-footer {
  border-top: 1px solid #f0f0f0;
  padding: 12px 20px;
}

/* Toast提示优化 */
.toast {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 12px 20px;
  font-weight: 500;
}

/* 侧边栏优化 */
.sidebar {
  transition: width 0.3s ease;
}
.sidebar .menu-item {
  transition: all 0.2s ease;
  border-radius: 6px;
  margin: 2px 8px;
}
.sidebar .menu-item:hover {
  background: rgba(255,255,255,0.1);
}
.sidebar .menu-item.active {
  background: rgba(255,255,255,0.15);
  font-weight: 600;
}

/* 统计卡片优化 */
.stat-card {
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

