/* ===== 基础 ===== */
html { font-size: 14px; }
@media (min-width: 768px) { html { font-size: 16px; } }

html { position: relative; min-height: 100%; }
body { margin-bottom: 60px; }

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color); text-align: end;
}
.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ===== 品牌/导航 ===== */
.brand-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff !important; font-size: 0.95rem;
}
.brand-tag {
  font-size: 0.7rem; font-weight: 500;
  padding: 2px 6px; border-radius: 4px;
  background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.85);
}
.navbar-dark .nav-link { display: flex; align-items: center; gap: 6px; opacity: 0.85; }
.navbar-dark .nav-link:hover { opacity: 1; }
.navbar-dark .nav-link.active {
  opacity: 1;
  color: #fff !important;
  background: linear-gradient(135deg, rgba(102,126,234,0.3), rgba(118,75,162,0.3));
  border-radius: 6px;
}

/* ===== Dashboard 欢迎条 ===== */
.hero-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-radius: 14px;
  padding: 28px 32px;
  box-shadow: 0 8px 24px rgba(102,126,234,0.25);
  position: relative;
  overflow: hidden;
}
.hero-card::after {
  content: "";
  position: absolute; right: -40px; top: -40px;
  width: 180px; height: 180px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}
.hero-card::before {
  content: "";
  position: absolute; right: 60px; bottom: -80px;
  width: 140px; height: 140px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}
.hero-eyebrow { font-size: 0.85rem; opacity: 0.85; margin-bottom: 4px; }
.hero-title { font-size: 1.7rem; font-weight: 600; margin: 0 0 4px; }
.hero-sub { font-size: 0.95rem; opacity: 0.9; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }

/* ===== 数据卡 ===== */
.section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 1.05rem; font-weight: 600;
  color: #444; padding: 4px 0 8px;
  border-bottom: 1px solid #eee;
  margin-bottom: 4px;
}
.stat-card {
  border-radius: 12px;
  padding: 20px 22px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.12); }
.stat-blue   { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.stat-orange { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.stat-green  { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }

.stat-head { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; opacity: 0.95; }
.stat-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,0.25); font-size: 1rem;
}
.stat-label { flex: 1; font-weight: 500; }
.stat-link  { color: #fff !important; text-decoration: none; font-size: 0.85rem; opacity: 0.9; }
.stat-link:hover { opacity: 1; }

.stat-value {
  font-size: 2.4rem; font-weight: 700; line-height: 1.1;
  margin: 8px 0 10px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.stat-foot { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  display: inline-block;
  padding: 3px 9px; font-size: 0.78rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.25);
  color: #fff;
  backdrop-filter: blur(4px);
  font-weight: 500;
}
.chip-success   { background: rgba(40,167,69,0.85); }
.chip-info      { background: rgba(23,162,184,0.85); }
.chip-warning   { background: rgba(255,193,7,0.85); color: #212529; }
.chip-secondary { background: rgba(108,117,125,0.85); }

/* ===== 快捷入口 ===== */
.quick-link {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px 12px; border-radius: 12px;
  text-decoration: none; color: #fff;
  min-height: 130px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.quick-link:hover { transform: translateY(-3px); color: #fff; box-shadow: 0 10px 24px rgba(0,0,0,0.15); }
.quick-link i { font-size: 1.8rem; margin-bottom: 8px; }
.quick-link span { font-size: 1rem; font-weight: 600; }
.quick-link small { font-size: 0.78rem; opacity: 0.85; margin-top: 2px; }

.quick-blue   { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.quick-orange { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.quick-green  { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.quick-purple { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }

/* ===== 列表页通用：page header + mini stat + 空状态 ===== */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
  padding-bottom: 14px; border-bottom: 1px solid #eee;
}
.page-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.45rem; font-weight: 600; margin: 0;
}
.page-title i { color: #667eea; }
.page-subtitle { color: #888; font-size: 0.85rem; margin-top: 2px; }

.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 768px) { .mini-stats { grid-template-columns: repeat(2, 1fr); } }
.mini-stat {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid #eef0f4; border-radius: 10px;
  padding: 14px 16px;
  transition: box-shadow 0.15s ease;
}
.mini-stat:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.05); }
.mini-stat .icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  font-size: 1.15rem; color: #fff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  flex-shrink: 0;
}
.mini-stat .icon.blue   { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.mini-stat .icon.orange { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.mini-stat .icon.green  { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.mini-stat .icon.purple { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }
.mini-stat .icon.gray   { background: linear-gradient(135deg, #bdc3c7 0%, #2c3e50 100%); }
.mini-stat .info { flex: 1; min-width: 0; }
.mini-stat .info .label { font-size: 0.78rem; color: #888; margin-bottom: 2px; }
.mini-stat .info .value { font-size: 1.35rem; font-weight: 600; color: #333; line-height: 1.1; }

.empty-state { padding: 18px 0; }
.empty-emoji { font-size: 2.6rem; margin-bottom: 6px; opacity: 0.85; }

/* ===== 列表页 / 详情页共用元素 ===== */
.table > thead { background: #f7f8fb; }
.table > thead th {
  font-weight: 600; color: #555; font-size: 0.85rem;
  border-bottom: 1px solid #e9ecef;
  text-transform: none; letter-spacing: 0;
}
.table tbody tr { transition: background-color 0.12s ease; }
.card { border-radius: 10px; }
.card-header { border-bottom: 1px solid #eef0f4; padding: 12px 16px; font-weight: 500; }

.tips { padding-left: 18px; }
.tips li { margin-bottom: 4px; color: #555; }

/* ===== 表单页美化 ===== */
.form-card { border: 0; box-shadow: 0 4px 14px rgba(0,0,0,0.05); border-radius: 12px; }
.form-card .card-body { padding: 24px 28px; }
.form-label { font-weight: 500; color: #555; font-size: 0.9rem; margin-bottom: 4px; }
.form-control, .form-select { border-radius: 6px; }
.form-control:focus, .form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.15rem rgba(102,126,234,0.15);
}

/* ===== 状态徽章颜色（更柔和） ===== */
.badge { font-weight: 500; padding: 0.35em 0.65em; }

/* ===== 分页 ===== */
.pagination .page-link { color: #667eea; }
.pagination .page-item.active .page-link {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: transparent; color: #fff;
}
