/* ============ 校友会管理平台 - 深蓝主题 ============ */
:root {
  --primary: #1a3a5c;
  --primary-light: #2c5f8a;
  --primary-gradient: linear-gradient(135deg, #1a3a5c 0%, #2c5f8a 100%);
  --gold: #c9a84c;
  --bg: #f0f2f5;
  --sidebar-w: 240px;
}

* { box-sizing: border-box; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  background: var(--bg);
  margin: 0;
  min-height: 100vh;
}

/* ============ 登录页 ============ */
.login-body {
  background: var(--primary-gradient);
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.login-body::before, .login-body::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}

.login-body::before {
  width: 500px; height: 500px;
  background: rgba(201, 168, 76, 0.18);
  top: -150px; left: -100px;
}

.login-body::after {
  width: 600px; height: 600px;
  background: rgba(100, 180, 255, 0.15);
  bottom: -200px; right: -150px;
}

.login-card {
  width: 420px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 20px;
  padding: 48px 40px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 2;
  animation: fadeUp 0.6s ease;
}

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

.login-logo {
  width: 72px; height: 72px;
  border-radius: 20px;
  background: var(--primary-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px;
  box-shadow: 0 10px 24px rgba(26, 58, 92, 0.35);
}

.login-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.login-sub {
  text-align: center;
  color: #8a94a6;
  font-size: 13px;
  margin-bottom: 32px;
}

.login-card .form-control {
  height: 46px;
  border-radius: 12px;
  border: 1.5px solid #e3e8ef;
  padding-left: 44px;
  font-size: 14px;
}

.login-card .form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(44, 95, 138, 0.12);
}

.input-icon {
  position: absolute;
  left: 15px; top: 13px;
  color: #9aa5b5;
  font-size: 17px;
  z-index: 5;
}

.btn-login {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 12px;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 4px;
  transition: all 0.3s;
  box-shadow: 0 8px 20px rgba(26, 58, 92, 0.35);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(26, 58, 92, 0.45);
  color: #fff;
}

.login-tip {
  text-align: center;
  margin-top: 22px;
  font-size: 12px;
  color: #9aa5b5;
}

/* ============ 布局 ============ */
.admin-sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--primary-gradient);
  color: #fff;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s;
}

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

.sidebar-brand .brand-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold), #e8cf8a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  box-shadow: 0 6px 16px rgba(201, 168, 76, 0.4);
}

.sidebar-brand .brand-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.sidebar-brand .brand-sub {
  font-size: 11px;
  opacity: 0.65;
  font-weight: 400;
}

.sidebar-nav {
  flex: 1;
  padding: 14px 12px;
  overflow-y: auto;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.nav-section {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  padding: 14px 12px 6px;
  letter-spacing: 2px;
}

.sidebar-nav a.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.75);
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 3px;
  transition: all 0.25s;
  text-decoration: none;
}

.sidebar-nav a.nav-link i { font-size: 17px; width: 20px; }

.sidebar-nav a.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar-nav a.nav-link.active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--gold);
}

/* 顶栏 */
.admin-main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  background: #fff;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-title {
  font-size: 17px;
  font-weight: 700;
  color: #2b3a55;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-user .user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.admin-content {
  padding: 26px 28px;
  flex: 1;
}

/* ============ 通用组件 ============ */
.card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(30, 60, 100, 0.06);
  margin-bottom: 22px;
}

.card-header {
  background: #fff;
  border-bottom: 1px solid #eef1f6;
  border-radius: 16px 16px 0 0 !important;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  color: #2b3a55;
}

.btn-primary {
  background: var(--primary-gradient);
  border: none;
  border-radius: 10px;
  font-size: 13px;
  padding: 8px 18px;
  box-shadow: 0 4px 12px rgba(26, 58, 92, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #16324e 0%, #24507a 100%);
}

.btn-soft {
  border-radius: 10px;
  font-size: 12.5px;
  padding: 6px 13px;
  border: 1px solid #e3e8ef;
  background: #fff;
  color: #5a6a85;
}

.btn-soft:hover { background: #f4f6fa; }

.btn-soft-danger { color: #d9534f; border-color: #f2d4d3; }
.btn-soft-danger:hover { background: #fdf3f2; }

/* 统计卡片 */
.stat-card {
  border-radius: 18px;
  padding: 22px;
  color: #fff;
  position: relative;
  overflow: hidden;
  height: 100%;
  box-shadow: 0 10px 26px rgba(26, 58, 92, 0.18);
}

.stat-card .stat-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-card .stat-value {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  margin-top: 14px;
}

.stat-card .stat-label {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 4px;
}

.stat-card .stat-deco {
  position: absolute;
  right: -30px; bottom: -30px;
  font-size: 110px;
  opacity: 0.1;
}

.bg-grad-1 { background: linear-gradient(135deg, #1a3a5c, #2c5f8a); }
.bg-grad-2 { background: linear-gradient(135deg, #7b4397, #dc2430); opacity: 1; background-color: #7b4397; background: linear-gradient(135deg, #8e44ad, #c0392b); }
.bg-grad-3 { background: linear-gradient(135deg, #0f9b8e, #28b487); }
.bg-grad-4 { background: linear-gradient(135deg, #c9a84c, #e8b930); }
.bg-grad-5 { background: linear-gradient(135deg, #2193b0, #6dd5ed); }
.bg-grad-6 { background: linear-gradient(135deg, #42275a, #734b6d); }

/* 表格 */
.table { margin-bottom: 0; }

.table thead th {
  background: #f7f9fc;
  color: #6b7a95;
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #eef1f6;
  padding: 13px 18px;
  white-space: nowrap;
}

.table tbody td {
  padding: 13px 18px;
  color: #3d4d68;
  font-size: 13.5px;
  vertical-align: middle;
  border-bottom: 1px solid #f2f5f9;
}

.table tbody tr:hover { background: #f8fafd; }
.table tbody tr:last-child td { border-bottom: none; }

/* 徽章 */
.badge-soft {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
}

.badge-soft-success { background: #e6f7ef; color: #1e8e5a; }
.badge-soft-warning { background: #fff7e6; color: #d4880f; }
.badge-soft-danger { background: #fdeeee; color: #d9534f; }
.badge-soft-info { background: #e8f1fb; color: #2c5f8a; }
.badge-soft-secondary { background: #eef1f6; color: #6b7a95; }

/* 模态框 */
.modal-content {
  border: none;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.modal-header {
  border-bottom: 1px solid #eef1f6;
  padding: 18px 24px;
}

.modal-title { font-size: 16px; font-weight: 700; color: #2b3a55; }

.modal-body { padding: 24px; }

.modal-footer { border-top: 1px solid #eef1f6; padding: 15px 24px; }

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #5a6a85;
  margin-bottom: 6px;
}

.form-control, .form-select {
  border-radius: 10px;
  border: 1.5px solid #e3e8ef;
  font-size: 13.5px;
  padding: 9px 14px;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(44, 95, 138, 0.1);
}

.form-check-input:checked { background-color: var(--primary-light); border-color: var(--primary-light); }

/* 分页 */
.pagination .page-link {
  border: none;
  color: #5a6a85;
  border-radius: 9px !important;
  margin: 0 3px;
  font-size: 13px;
  padding: 7px 14px;
}

.pagination .page-item.active .page-link {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 4px 10px rgba(26, 58, 92, 0.25);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #9aa5b5;
}

.empty-state i { font-size: 48px; opacity: 0.4; }
.empty-state p { margin-top: 12px; font-size: 14px; }

/* 缩略图 */
.thumb {
  width: 56px; height: 40px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #eef1f6;
}

.thumb-round {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

/* Toast */
.toast-box {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 3000;
}

/* 响应式 */
@media (max-width: 991px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.show { transform: translateX(0); }
  .admin-main { margin-left: 0; }
}
