* { box-sizing: border-box; }
body { margin: 0; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #f5f5f5; color: #333; }
a { color: #c9302c; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Login */
.login-body { background: linear-gradient(135deg, #8B0000 0%, #c9302c 100%); display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { background: #fff; padding: 40px; border-radius: 10px; width: 400px; box-shadow: 0 10px 40px rgba(0,0,0,0.3); }
.login-box h2 { margin: 0 0 10px; text-align: center; color: #c9302c; font-size: 22px; }
.login-box h3 { margin: 0 0 30px; text-align: center; color: #666; font-weight: normal; font-size: 16px; }
.login-tip { text-align: center; color: #999; font-size: 13px; margin-top: 20px; }

/* Layout */
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-sidebar { width: 220px; background: #8B0000; color: #fff; position: fixed; left: 0; top: 0; bottom: 0; overflow-y: auto; }
.admin-sidebar .logo { padding: 20px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.1); }
.admin-sidebar .logo h1 { font-size: 18px; margin: 0; line-height: 1.4; }
.admin-sidebar .logo p { font-size: 12px; margin: 5px 0 0; opacity: 0.8; }
.admin-sidebar ul { list-style: none; padding: 0; margin: 0; }
.admin-sidebar li a { display: block; padding: 15px 20px; color: #fff; border-left: 4px solid transparent; transition: all 0.2s; }
.admin-sidebar li a:hover, .admin-sidebar li.active a { background: rgba(255,255,255,0.1); border-left-color: #FFD700; }
.admin-sidebar li a i { display: inline-block; width: 24px; }

.admin-main { flex: 1; margin-left: 220px; }
.admin-header { background: #fff; padding: 15px 30px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); display: flex; justify-content: space-between; align-items: center; }
.admin-header .user-info { color: #666; }
.admin-content { padding: 30px; }

/* Components */
.card { background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 20px; }
.card-header { padding: 15px 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.card-header h3 { margin: 0; font-size: 18px; }
.card-body { padding: 20px; }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; }
.form-control { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.form-control:focus { border-color: #c9302c; outline: none; }
textarea.form-control { min-height: 80px; resize: vertical; }
select.form-control { height: 40px; }

.btn { display: inline-block; padding: 10px 20px; border-radius: 4px; border: none; cursor: pointer; font-size: 14px; transition: background 0.2s; text-align: center; }
.btn-primary { background: #c9302c; color: #fff; }
.btn-primary:hover { background: #a52824; }
.btn-success { background: #5cb85c; color: #fff; }
.btn-success:hover { background: #4cae4c; }
.btn-warning { background: #f0ad4e; color: #fff; }
.btn-danger { background: #d9534f; color: #fff; }
.btn-info { background: #5bc0de; color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { display: block; width: 100%; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 15px; border-bottom: 1px solid #eee; text-align: left; }
.table th { background: #f9f9f9; font-weight: 600; }
.table tr:hover { background: #f9f9f9; }
.table .actions a { margin-right: 8px; }

.alert { padding: 12px 15px; border-radius: 4px; margin-bottom: 15px; }
.alert-danger { background: #f2dede; color: #a94442; }
.alert-success { background: #dff0d8; color: #3c763d; }
.alert-info { background: #d9edf7; color: #31708f; }
.alert-warning { background: #fcf8e3; color: #8a6d3b; }

.badge { display: inline-block; padding: 3px 8px; border-radius: 3px; font-size: 12px; }
.badge-success { background: #dff0d8; color: #3c763d; }
.badge-danger { background: #f2dede; color: #a94442; }
.badge-warning { background: #fcf8e3; color: #8a6d3b; }
.badge-info { background: #d9edf7; color: #31708f; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); text-align: center; }
.stat-card .number { font-size: 32px; font-weight: bold; color: #c9302c; }
.stat-card .label { color: #666; margin-top: 5px; }

.pagination { margin-top: 20px; text-align: center; }
.pagination a, .pagination span { display: inline-block; padding: 6px 12px; margin: 0 3px; border: 1px solid #ddd; border-radius: 4px; }
.pagination a:hover { background: #c9302c; color: #fff; border-color: #c9302c; }
.pagination .current { background: #c9302c; color: #fff; border-color: #c9302c; }

.modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 1000; justify-content: center; align-items: center; }
.modal.active { display: flex; }
.modal-content { background: #fff; border-radius: 8px; width: 600px; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 15px 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { margin: 0; }
.modal-body { padding: 20px; }
.modal-footer { padding: 15px 20px; border-top: 1px solid #eee; text-align: right; }
.modal-close { font-size: 24px; cursor: pointer; color: #999; }

.filter-bar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-bar input, .filter-bar select { padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; }

.tabs { border-bottom: 1px solid #ddd; margin-bottom: 20px; }
.tabs a { display: inline-block; padding: 10px 20px; border-bottom: 2px solid transparent; }
.tabs a.active { border-bottom-color: #c9302c; color: #c9302c; }

@media (max-width: 768px) {
    .admin-sidebar { width: 180px; }
    .admin-main { margin-left: 180px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
