/* 易试管后台管理系统 - 统一样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: #f5f6fa; color: #333; }

/* 布局 */
.admin-wrapper { display: flex; min-height: 100vh; }
.sidebar { width: 260px; background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%); color: white; position: fixed; height: 100vh; overflow-y: auto; z-index: 100; }
.sidebar-header { padding: 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-header h1 { font-size: 1.25rem; font-weight: 600; }
.sidebar-nav { padding: 1rem 0; }
.nav-category { padding: 0.75rem 1.5rem; color: rgba(255,255,255,0.4); font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-top: 1rem; }
.nav-item { display: flex; align-items: center; padding: 0.75rem 1.5rem; color: rgba(255,255,255,0.8); text-decoration: none; transition: all 0.3s; }
.nav-item:hover { background: rgba(255,255,255,0.1); color: white; }
.nav-item.active { background: rgba(102,126,234,0.3); color: white; border-left: 3px solid #667eea; }
.nav-item .icon { margin-right: 0.75rem; font-size: 1.1rem; }
.sidebar-footer { padding: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); position: absolute; bottom: 0; width: 100%; }
.btn-logout { width: 100%; padding: 0.75rem; background: rgba(255,255,255,0.1); color: white; border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; cursor: pointer; transition: all 0.3s; }
.btn-logout:hover { background: rgba(255,255,255,0.2); }

.main-content { flex: 1; margin-left: 260px; }
.top-bar { background: white; padding: 1rem 2rem; border-bottom: 1px solid #e8e8e8; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 50; }
.top-bar h2 { font-size: 1.25rem; color: #2c3e50; }
.user-info { display: flex; align-items: center; gap: 1rem; }
.user-info span { color: #666; }

.content { padding: 2rem; max-width: 1400px; }

/* 统计卡片 */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card { background: white; padding: 1.5rem; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); display: flex; align-items: center; gap: 1rem; }
.stat-icon { width: 60px; height: 60px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.stat-info { flex: 1; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: #2c3e50; }
.stat-label { color: #999; font-size: 0.875rem; margin-top: 0.25rem; }

/* 卡片 */
.card { background: white; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); margin-bottom: 1.5rem; }
.card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid #e8e8e8; display: flex; justify-content: space-between; align-items: center; }
.card-header h3 { font-size: 1rem; color: #2c3e50; }
.card-body { padding: 1.5rem; }

/* 表格 */
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 1rem; text-align: left; border-bottom: 1px solid #e8e8e8; }
.data-table th { background: #f8f9fa; font-weight: 600; color: #555; font-size: 0.875rem; }
.data-table tr:hover { background: #f8f9fa; }
.data-table tr:last-child td { border-bottom: none; }

/* 按钮 */
.btn { display: inline-block; padding: 0.625rem 1.25rem; border-radius: 6px; font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: all 0.3s; border: none; text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(102,126,234,0.3); }
.btn-success { background: #28a745; color: white; }
.btn-danger { background: #dc3545; color: white; }
.btn-warning { background: #ffc107; color: #333; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; }
.btn-group { display: flex; gap: 0.5rem; }

/* 表单 */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: #333; font-weight: 500; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 0.75rem; border: 2px solid #e8e8e8; border-radius: 6px; font-size: 0.9375rem; transition: border-color 0.3s; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: #667eea; }
.form-group textarea { min-height: 120px; resize: vertical; font-family: inherit; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }

/* 状态标签 */
.badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.75rem; font-weight: 500; }
.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-info { background: #cce5ff; color: #004085; }
.badge-secondary { background: #e8e8e8; color: #666; }

/* 模态框 */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal { background: white; border-radius: 12px; width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid #e8e8e8; display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 1.125rem; color: #2c3e50; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid #e8e8e8; display: flex; justify-content: flex-end; gap: 0.75rem; }

/* 空状态 */
.empty-state { text-align: center; padding: 3rem 1rem; color: #999; }
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state p { font-size: 1rem; }

/* 页面标题栏 */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.page-header h2 { font-size: 1.5rem; color: #2c3e50; }

/* 搜索栏 */
.search-bar { background: white; padding: 1rem; border-radius: 8px; margin-bottom: 1.5rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }
.search-bar input, .search-bar select { padding: 0.625rem 1rem; border: 1px solid #ddd; border-radius: 6px; font-size: 0.875rem; }
.search-bar input { flex: 1; min-width: 200px; }
