
:root {
  
  --blue-50: #e8f0fe;
  --blue-100: #c6dafc;
  --blue-200: #a0c1f5;
  --blue-300: #7aa7ed;
  --blue-400: #5c8fe5;
  --blue-500: #3b77db;
  --blue-600: #2461c2;
  --blue-700: #1a4da0;
  --blue-800: #123a7e;
  --blue-900: #0c2a5d;

  
  --amber-50: #fff8e7;
  --amber-100: #ffedc2;
  --amber-200: #ffd98a;
  --amber-300: #ffc452;
  --amber-400: #ffb02a;
  --amber-500: #f59e0b;
  --amber-600: #d97706;

  
  --green-500: #10b981;
  --green-100: #d1fae5;
  --red-500: #ef4444;
  --red-100: #fee2e2;
  --yellow-500: #f59e0b;
  --yellow-100: #fef3c7;

  
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);

  
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  
  --sidebar-width: 240px;
}

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

body {
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }


.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 24px; border-radius: var(--radius-md); font-size: 14px;
  font-weight: 500; transition: all var(--transition); white-space: nowrap;
}
.btn-primary {
  background: var(--blue-600); color: white;
  box-shadow: 0 2px 8px rgba(36,97,194,0.3);
}
.btn-primary:hover { background: var(--blue-700); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(36,97,194,0.4); }
.btn-secondary {
  background: white; color: var(--blue-700);
  border: 1.5px solid var(--blue-300);
}
.btn-secondary:hover { background: var(--blue-50); border-color: var(--blue-400); }
.btn-outline {
  background: transparent; color: var(--gray-600);
  border: 1.5px solid var(--gray-300);
}
.btn-outline:hover { border-color: var(--gray-400); background: var(--gray-50); }
.btn-ghost {
  background: transparent; color: var(--gray-500); padding: 8px 12px;
}
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-700); }
.btn-danger {
  background: var(--red-500); color: white;
}
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-icon { padding: 8px; border-radius: 50%; width: 36px; height: 36px; }


.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500;
}
.badge-blue { background: var(--blue-100); color: var(--blue-700); }
.badge-amber { background: var(--amber-100); color: var(--amber-600); }
.badge-green { background: var(--green-100); color: var(--green-500); }
.badge-red { background: var(--red-100); color: var(--red-500); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }


.card {
  background: white; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200);
  transition: all var(--transition);
}
.card-hover:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }


.layout { min-height: 100vh; }
.sidebar { width: var(--sidebar-width); background: var(--blue-900); color: white; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; display: flex; flex-direction: column; overflow: hidden; }
.main-content { margin-left: var(--sidebar-width); width: calc(100vw - var(--sidebar-width)); min-height: 100vh; }
.topbar { height: 60px; background: white; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; padding: 0 28px; position: sticky; top: 0; z-index: 50; }
.content-area { padding: 28px; }
.page-title { font-size: 24px; font-weight: 700; color: var(--gray-900); margin-bottom: 24px; }


.sidebar-logo { padding: 20px 20px 28px; border-bottom: 1px solid rgba(255,255,255,0.1); flex-shrink: 0; }
.sidebar-logo .logo-text { font-size: 18px; font-weight: 700; letter-spacing: 0.5px;text-wrap: nowrap; }
.sidebar-logo .logo-sub { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 4px; }
.sidebar-nav { padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; padding-bottom: 80px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-radius: var(--radius-md);
  font-size: 14px; color: rgba(255,255,255,0.65);
  transition: all var(--transition); position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: white; }
.nav-item.active { background: rgba(255,255,255,0.15); color: white; font-weight: 500; }
.nav-item.active::before {
  content: ''; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; background: var(--amber-400); border-radius: 2px;
}
.nav-icon { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-icon svg { width: 18px; height: 18px; }
.sidebar-section { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,0.3); padding: 16px 16px 8px; font-weight: 600; }
.sidebar-footer { position: absolute; bottom: 0; left: 0; right: 0; padding: 14px 16px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; gap: 10px; background: var(--blue-900); z-index: 10; }
.sidebar-footer .user-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sidebar-footer .user-name { font-size: 13px; font-weight: 500; color: white; line-height: 1.3; }
.sidebar-footer .user-detail { font-size: 11px; color: rgba(255,255,255,0.5); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; line-height: 1.3; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--blue-500); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; color: white; }


.topbar-left { display: flex; align-items: center; gap: 16px; }
.breadcrumb { font-size: 13px; color: var(--gray-500); display: flex; align-items: center; gap: 8px; }
.breadcrumb span:last-child { color: var(--gray-800); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-search { position: relative; }
.topbar-search input {
  padding: 8px 16px 8px 36px; border: 1.5px solid var(--gray-200); border-radius: var(--radius-md);
  font-size: 13px; width: 240px; outline: none; transition: all var(--transition);
  background: var(--gray-50);
}
.topbar-search input:focus { border-color: var(--blue-400); background: white; box-shadow: 0 0 0 3px rgba(59,119,219,0.1); }
.topbar-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--gray-400); }
.notification-btn {
  position: relative; width: 40px; height: 40px; border-radius: 50%;
  background: var(--gray-100); display: flex; align-items: center; justify-content: center; color: var(--gray-500);
}
.notification-btn:hover { background: var(--gray-200); color: var(--gray-700); }
.notification-badge {
  position: absolute; top: 6px; right: 6px; width: 8px; height: 8px;
  background: var(--red-500); border-radius: 50%; border: 2px solid var(--gray-100);
}


.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { padding: 20px 24px; display: flex; flex-direction: column; gap: 8px; }
.stat-card .stat-label { font-size: 13px; color: var(--gray-500); font-weight: 500; }
.stat-card .stat-value { font-size: 32px; font-weight: 700; color: var(--gray-900); line-height: 1; }
.stat-card .stat-change { font-size: 12px; display: flex; align-items: center; gap: 4px; }
.stat-change.up { color: var(--green-500); }
.stat-change.down { color: var(--red-500); }


.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; padding: 12px 16px; color: var(--gray-500); font-weight: 600; font-size: 13px; border-bottom: 2px solid var(--gray-200); white-space: nowrap; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--gray-100); }
.data-table tr:hover td { background: var(--blue-50); }
.data-table .td-name { font-weight: 500; color: var(--gray-800); }
.data-table .td-score { font-weight: 600; font-size: 15px; }


.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--gray-300); border-radius: var(--radius-md);
  font-size: 14px; outline: none; transition: all var(--transition);
}
.form-input:focus { border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(59,119,219,0.1); }
.form-select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }


.tag-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tag {
  padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 500;
  border: 1.5px solid var(--gray-200); color: var(--gray-600);
  transition: all var(--transition); cursor: pointer; user-select: none;
}
.tag:hover { border-color: var(--blue-300); color: var(--blue-600); }
.tag.active { background: var(--blue-600); color: white; border-color: var(--blue-600); }


.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: white; border-radius: var(--radius-xl); box-shadow: var(--shadow-xl);
  max-width: 520px; width: 90%; max-height: 85vh; overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-header { padding: 24px 28px 0; font-size: 18px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 24px 28px; }
.modal-footer { padding: 0 28px 24px; display: flex; justify-content: flex-end; gap: 12px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }


.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.text-sm { font-size: 13px; }
.text-gray { color: var(--gray-500); }
.text-success { color: var(--green-500); }
.text-danger { color: var(--red-500); }
.text-blue { color: var(--blue-600); }
.font-bold { font-weight: 700; }


::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }


.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }


@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform var(--transition-slow); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .content-area { padding: 16px; }
  .topbar { padding: 0 16px; }
}
