/* Admin Panel Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; color: #333; background: #f5f5f5; }
a { color: #43a047; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #1e293b; color: #fff; flex-shrink: 0; padding: 16px 0; }
.sidebar .logo { padding: 16px 20px; font-size: 18px; font-weight: bold; border-bottom: 1px solid rgba(255, 255, 255, .1); margin-bottom: 12px; }
.sidebar a { display: block; padding: 10px 20px; color: rgba(255, 255, 255, .7); text-decoration: none; font-size: 14px; transition: all .2s; }
.sidebar a:hover, .sidebar a.active { background: rgba(255, 255, 255, .1); color: #fff; text-decoration: none; }
.admin-main { flex: 1; padding: 20px; overflow-x: auto; }

/* Page Header */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.page-header h2 { font-size: 20px; color: #1e293b; }

/* Card */
.card { background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); margin-bottom: 20px; }
.card-body { padding: 20px; }

/* Data Table */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; font-size: 14px; }
.data-table th { background: #f9fafb; font-weight: 600; color: #666; }
.data-table tr:hover { background: #f9fafb; }
.data-table .actions { white-space: nowrap; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 14px; color: #333; }
.form-input { width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; transition: border .3s; }
.form-input:focus { outline: none; border-color: #43a047; }
textarea.form-input { resize: vertical; min-height: 60px; }

/* Buttons */
.btn { padding: 8px 16px; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; transition: all .2s; display: inline-block; text-decoration: none; }
.btn-primary { background: #43a047; color: #fff; }
.btn-primary:hover { background: #2e7d32; }
.btn-default { background: #f0f0f0; color: #333; }
.btn-default:hover { background: #e0e0e0; }
.btn-danger { background: #d9534f; color: #fff; }
.btn-danger:hover { background: #c9302c; }
.btn-info { background: #5bc0de; color: #fff; }
.btn-info:hover { background: #46b8da; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* Modal */
.modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1000; }
.modal-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, .5); }
.modal-content { position: relative; margin: 60px auto; max-width: 550px; background: #fff; border-radius: 12px; box-shadow: 0 10px 40px rgba(0, 0, 0, .15); }
.modal-header { padding: 16px 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 16px; margin: 0; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #999; padding: 0; line-height: 1; }
.modal-body { padding: 20px; }
.modal-footer { padding: 12px 20px; border-top: 1px solid #eee; text-align: right; display: flex; justify-content: flex-end; gap: 8px; }

/* Tabs */
.tabs { display: flex; border-bottom: 2px solid #eee; margin-bottom: 16px; }
.tab-btn { padding: 8px 16px; border: none; background: none; font-size: 14px; cursor: pointer; color: #666; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s; }
.tab-btn.active { color: #43a047; border-bottom-color: #43a047; font-weight: 600; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
.pagination button { padding: 6px 12px; border: 1px solid #ddd; background: #fff; border-radius: 4px; cursor: pointer; font-size: 13px; }
.pagination button.active { background: #43a047; color: #fff; border-color: #43a047; }
.pagination button:disabled { opacity: .5; cursor: default; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.stat-card .stat-value { font-size: 28px; font-weight: bold; color: #1e293b; }
.stat-card .stat-label { font-size: 13px; color: #999; margin-top: 4px; }

/* Status Badge */
.status-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; color: #fff; }

/* Responsive */
@media (max-width: 768px) {
    .admin-layout { flex-direction: column; }
    .sidebar { width: 100%; padding: 10px 0; }
    .sidebar a { display: inline-block; padding: 8px 12px; }
    .modal-content { margin: 20px; max-width: none; }
}
