/* admin/css/style.css - 管理后台全局样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #f0f2f5;
  color: #333;
  font-size: 14px;
}

/* 登录页 */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1677ff, #0958d9);
}

.login-box {
  width: 420px;
  background: #fff;
  border-radius: 12px;
  padding: 48px 40px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.login-header { text-align: center; margin-bottom: 32px; }

.login-logo {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, #1677ff, #0958d9);
  color: #fff;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: bold;
  margin: 0 auto 16px;
}

.login-header h1 { font-size: 24px; color: #333; }
.login-header p { font-size: 14px; color: #999; margin-top: 4px; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; color: #666; margin-bottom: 8px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 16px;
  border: 1px solid #e8e8e8; border-radius: 8px;
  font-size: 14px; outline: none; transition: border-color 0.3s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: #1677ff;
}

.btn-login {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, #1677ff, #0958d9);
  color: #fff; border: none; border-radius: 8px;
  font-size: 16px; font-weight: 500; cursor: pointer;
  transition: opacity 0.3s;
}
.btn-login:hover { opacity: 0.9; }

.login-footer { text-align: center; margin-top: 24px; color: #ccc; font-size: 12px; }

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

.sidebar {
  width: 240px; background: #001529;
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100;
}

.sidebar-header {
  padding: 20px 24px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
  width: 40px; height: 40px;
  background: #1677ff; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: bold; font-size: 18px;
  flex-shrink: 0;
}

.sidebar-title { color: #fff; font-size: 15px; font-weight: 500; }

.sidebar-nav { flex: 1; padding: 16px 0; overflow-y: auto; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 14px; cursor: pointer;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.nav-item:hover { color: #fff; background: rgba(255,255,255,0.05); }
.nav-item.active { color: #fff; background: #1677ff; border-left-color: #fff; }
.nav-icon { font-size: 18px; width: 20px; text-align: center; }

.sidebar-footer { padding: 16px 24px; border-top: 1px solid rgba(255,255,255,0.1); }
.btn-logout {
  width: 100%; padding: 10px;
  background: transparent; color: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.2); border-radius: 6px;
  cursor: pointer; font-size: 14px;
  transition: all 0.3s;
}
.btn-logout:hover { color: #ff4d4f; border-color: #ff4d4f; }

/* 主内容 */
.main-content {
  flex: 1; margin-left: 240px;
  display: flex; flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: 64px; background: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  position: sticky; top: 0; z-index: 50;
}

.topbar h2 { font-size: 18px; color: #333; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.admin-name { font-size: 14px; color: #666; }
.btn-change-pwd {
  padding: 6px 16px; border: 1px solid #1677ff; background: #fff; color: #1677ff;
  border-radius: 6px; cursor: pointer; font-size: 13px; transition: all 0.2s;
}
.btn-change-pwd:hover { background: #1677ff; color: #fff; }
.btn-logout-top {
  padding: 6px 18px; border: 1px solid #ff4d4f; background: #fff; color: #ff4d4f;
  border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 500;
  transition: all 0.2s;
}
.btn-logout-top:hover { background: #ff4d4f; color: #fff; }
.current-time { font-size: 13px; color: #999; }

.page-content { flex: 1; padding: 24px; overflow-y: auto; }

/* 通用组件 */
.card {
  background: #fff; border-radius: 8px;
  padding: 24px; margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

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

.card-title { font-size: 16px; font-weight: 600; color: #333; }

.btn {
  padding: 8px 20px; border: none; border-radius: 6px;
  font-size: 14px; cursor: pointer; transition: all 0.3s;
}
.btn-primary { background: #1677ff; color: #fff; }
.btn-primary:hover { background: #0958d9; }
.btn-success { background: #52c41a; color: #fff; }
.btn-warning { background: #faad14; color: #fff; }
.btn-danger { background: #ff4d4f; color: #fff; }
.btn-outline { background: #fff; color: #1677ff; border: 1px solid #1677ff; }
.btn-sm { padding: 4px 12px; font-size: 12px; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
th { background: #fafafa; font-weight: 600; color: #666; }
tr:hover { background: #fafafa; }

.tag {
  display: inline-block; padding: 2px 8px;
  border-radius: 4px; font-size: 12px;
}
.tag-blue { background: #e6f4ff; color: #1677ff; }
.tag-green { background: #f6ffed; color: #52c41a; }
.tag-orange { background: #fff7e6; color: #fa8c16; }
.tag-red { background: #fff1f0; color: #ff4d4f; }
.tag-gray { background: #f5f5f5; color: #999; }

.search-bar {
  display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.search-bar input, .search-bar select {
  padding: 8px 12px; border: 1px solid #e8e8e8; border-radius: 6px;
  font-size: 14px; outline: none;
}
.search-bar input { min-width: 200px; }

.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-top: 16px;
}
.pagination button {
  padding: 6px 12px; border: 1px solid #e8e8e8; border-radius: 4px;
  background: #fff; cursor: pointer; font-size: 13px;
}
.pagination button.active { background: #1677ff; color: #fff; border-color: #1677ff; }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }

/* 模态框 */
.modal-mask {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 999;
  display: flex; align-items: center; justify-content: center;
}
.modal-box {
  background: #fff; border-radius: 12px;
  width: 90%; max-width: 600px; max-height: 80vh;
  overflow-y: auto; padding: 32px;
}
.modal-title { font-size: 18px; font-weight: 600; margin-bottom: 24px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }

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

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: #fff; border-radius: 8px; padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.stat-card .stat-icon { font-size: 32px; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 32px; font-weight: 700; color: #333; }
.stat-card .stat-label { font-size: 13px; color: #999; margin-top: 4px; }
.stat-card .stat-trend { font-size: 12px; margin-top: 8px; }
.stat-card .stat-trend.up { color: #52c41a; }
.stat-card .stat-trend.down { color: #ff4d4f; }

/* 登录页：双 LOGO + 项目副标题 + 页面底部版权声明（2026-09-01） */
.login-logos {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  margin: 0 auto 18px;
}
.project-title {
  font-size: 15px;
  color: #555;
  margin-top: 14px;
  line-height: 1.7;
  font-weight: 500;
  letter-spacing: 0.5px;
}
.login-page-footer {
  position: fixed;
  right: 24px;
  bottom: 18px;
  text-align: right;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  line-height: 1.6;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  white-space: nowrap;
}
.login-page-footer strong { color: #fff; margin: 0 2px; font-weight: 600; }
.login-page-footer a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.55); pointer-events: auto; }
