/* 全局样式 - 简洁美观 */
:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

.navbar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: var(--shadow);
  padding: 0.7rem 1rem;
}

.navbar-brand {
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

.nav-link {
  font-size: 0.9rem;
  padding: 0.5rem 1rem !important;
  border-radius: 6px;
  transition: background 0.15s;
}

.nav-link:hover { background: rgba(255,255,255,0.1); }
.nav-link.active { background: rgba(255,255,255,0.2); font-weight: 500; }

/* 卡片 */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--card-bg);
}

.card-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  padding: 0.9rem 1.25rem;
}

/* 统计卡片 */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.15s, box-shadow 0.15s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.4rem;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.stat-meta {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.4rem;
}

/* 表格 */
.table {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.table thead th {
  background: #f1f5f9;
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 0.75rem;
}

.table tbody td {
  padding: 0.7rem 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}

.table tbody tr:hover {
  background: #f8fafc;
}

/* 按钮 */
.btn {
  border-radius: 6px;
  font-size: 0.875rem;
  padding: 0.4rem 0.9rem;
  font-weight: 500;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-sm { padding: 0.25rem 0.6rem; font-size: 0.8rem; }

/* 表单 */
.form-control, .form-select {
  border-radius: 6px;
  border: 1px solid var(--border);
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 0.35rem;
}

/* 徽章 */
.badge { font-weight: 500; padding: 0.3em 0.6em; font-size: 0.75rem; }

/* 移动端适配 */
@media (max-width: 768px) {
  .container-fluid { padding-left: 0.75rem; padding-right: 0.75rem; }
  .stat-value { font-size: 1.3rem; }
  .table { font-size: 0.82rem; }
  .table thead th, .table tbody td { padding: 0.5rem 0.4rem; }
  .hide-mobile { display: none !important; }
  /* 表格转卡片视图 */
  .table-responsive-card table thead { display: none; }
  .table-responsive-card table tbody tr {
    display: block;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem;
  }
  .table-responsive-card table tbody td {
    display: flex;
    justify-content: space-between;
    align-align: start;
    padding: 0.4rem 0.5rem;
    border-bottom: 1px dashed #f1f5f9;
  }
  .table-responsive-card table tbody td:last-child { border-bottom: none; }
  .table-responsive-card table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.78rem;
    margin-right: 1rem;
  }
}

@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}

/* 工具类 */
.text-muted { color: var(--text-light) !important; }
.empty-state {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-light);
}
.empty-state i { font-size: 3rem; opacity: 0.4; display: block; margin-bottom: 1rem; }