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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 220px;
    background: #2c3e50;
    color: #fff;
    position: fixed;
    height: 100vh;
    transition: width 0.3s ease;
    overflow: hidden;
    z-index: 1000;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar-header {
    padding: 15px 20px;
    border-bottom: 1px solid #34495e;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-title {
    font-size: 16px;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-title {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: #bdc3c7;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s;
}

.sidebar-toggle:hover {
    background: #34495e;
    color: #fff;
}

.sidebar-nav {
    padding: 10px 0;
    height: calc(100vh - 60px);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: #2c3e50;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: #34495e;
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: #4a6785;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-nav .nav-item:hover, .sidebar-nav .nav-item.active {
    background: #34495e;
    color: #fff;
}

.nav-icon {
    font-size: 16px;
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.nav-text {
    transition: opacity 0.3s ease, width 0.3s ease;
}

.sidebar.collapsed .nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .nav-icon {
    margin-right: 0;
}

.sidebar-nav .nav-section {
    margin-top: 10px;
    transition: opacity 0.3s ease;
}

.nav-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px 5px;
    font-size: 11px;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    user-select: none;
}

.nav-section-title:hover {
    color: #bdc3c7;
}

.section-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.sidebar-nav .nav-section.collapsed .section-arrow {
    transform: rotate(-90deg);
}

.nav-section-content {
    overflow: hidden;
    max-height: 500px;
    transition: max-height 0.3s ease;
}

.sidebar-nav .nav-section.collapsed .nav-section-content {
    max-height: 0;
}

.sidebar.collapsed .nav-section {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.admin-main {
    flex: 1;
    margin-left: 220px;
    transition: margin-left 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-header {
    background: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.admin-header a {
    color: #666;
    text-decoration: none;
}

.admin-content {
    padding: 20px;
    flex: 1;
    overflow: hidden;
}

.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
}

.admin-footer {
    padding: 15px 20px;
    text-align: center;
    font-size: 12px;
    color: #999;
    background: #fff;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.admin-footer a {
    color: #999;
    text-decoration: none;
}

.admin-footer a:hover {
    color: #666;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: #3498db;
    border-color: #3498db;
    color: #fff;
}

.btn-danger {
    background: #e74c3c;
    border-color: #e74c3c;
    color: #fff;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* 统计页面专用样式 - 覆盖Bootstrap浮动布局 */
.admin-content .stats-cards,
.admin-content .row,
.admin-content .col-md-6,
.admin-content .panel {
    float: none !important;
    position: static !important;
    display: block !important;
    box-sizing: border-box !important;
}

.admin-content .stats-cards {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
    margin-bottom: 24px !important;
    clear: both !important;
}

.admin-content .stats-cards::before,
.admin-content .stats-cards::after {
    display: none !important;
}

.admin-content .stats-cards .stat-card {
    background: #fff !important;
    padding: 16px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    min-width: auto !important;
    width: auto !important;
    float: none !important;
}

.admin-content .stats-cards .stat-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.admin-content .stats-cards .stat-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    flex-shrink: 0 !important;
}

.admin-content .stats-cards .stat-icon.bg-blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
}

.admin-content .stats-cards .stat-icon.bg-green {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
    color: #fff !important;
}

.admin-content .stats-cards .stat-icon.bg-purple {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%) !important;
    color: #fff !important;
}

.admin-content .stats-cards .stat-icon.bg-orange {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    color: #fff !important;
}

.admin-content .stats-cards .stat-info {
    flex: 1 !important;
    min-width: 0 !important;
}

.admin-content .stats-cards .stat-value {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    line-height: 1.2 !important;
    margin: 0 !important;
}

.admin-content .stats-cards .stat-label {
    color: #6b7280 !important;
    font-size: 12px !important;
    margin-top: 2px !important;
}

.admin-content .stats-cards .stat-trend {
    font-size: 11px !important;
    padding: 3px 6px !important;
    border-radius: 10px !important;
    margin-top: 4px !important;
}

.stat-trend.positive {
    background: #dcfce7;
    color: #16a34a;
}

.stat-trend.negative {
    background: #fee2e2;
    color: #dc2626;
}

/* 响应式布局 */
.admin-content .row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
    margin-bottom: 20px !important;
    clear: both !important;
    float: none !important;
}

.admin-content .row::before,
.admin-content .row::after {
    display: none !important;
}

.admin-content .row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
    margin-bottom: 20px !important;
    clear: both !important;
}

.admin-content .row .col-md-6 {
    width: 100% !important;
    float: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.admin-content .panel {
    background: #fff !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    margin-bottom: 0 !important;
    border: none !important;
    overflow: hidden !important;
}

.admin-content .panel-header {
    padding: 14px 16px !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: #fafafa !important;
}

.admin-content .panel-header h3 {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1a1a2e !important;
    margin: 0 !important;
}

.admin-content .panel-body {
    padding: 12px !important;
}

/* 举报统计面板专用样式 */
.admin-content .panel:last-child {
    margin-top: 16px !important;
}

.admin-content .panel:last-child .panel-body {
    padding: 10px !important;
}

.admin-content .panel:last-child .panel-body .row {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 0 !important;
}

@media (max-width: 992px) {
    .admin-content .row {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .admin-content .stats-cards {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 576px) {
    .admin-content .stats-cards {
        grid-template-columns: 1fr !important;
    }
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
}

/* Canvas图表样式 */
canvas {
    max-width: 100%;
    height: 250px !important;
}

.table th,
.table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

.table th {
    background: #f9fafb;
    font-weight: 600;
    color: #4b5563;
    font-size: 13px;
}

.table td {
    font-size: 14px;
    color: #374151;
}

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

.table-striped tbody tr:nth-of-type(odd) {
    background: #fff;
}

.table-striped tbody tr:nth-of-type(even) {
    background: #f9fafb;
}

/* 头像样式 */
.avatar-xs {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    vertical-align: middle;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.badge-primary {
    background: #dbeafe;
    color: #1d4ed8;
}

/* 举报统计样式 */
.report-stats-row {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 12px;
}

.report-stat-item {
    text-align: center;
    padding: 10px 14px !important;
    background: #f9fafb !important;
    border-radius: 6px !important;
    transition: transform 0.2s ease !important;
}

.report-stat-item:hover {
    transform: translateY(-2px);
}

.report-stat-value {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    margin-bottom: 2px !important;
}

.report-stat-label {
    font-size: 11px !important;
    color: #6b7280 !important;
    white-space: nowrap;
}

.report-stat-item.pending .report-stat-value {
    color: #f59e0b;
}

.report-stat-item.handled .report-stat-value {
    color: #10b981;
}

.report-stat-item.rejected .report-stat-value {
    color: #ef4444;
}

.server-info-section {
    margin-top: 30px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
}

.server-info-section h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.server-info-table {
    width: 100%;
    border-collapse: collapse;
}

.server-info-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.server-info-table .info-label {
    width: 120px;
    color: #666;
    font-weight: 500;
    background: #f8f9fa;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.data-table {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.content-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination a {
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.pagination a.active {
    background: #3498db;
    border-color: #3498db;
    color: #fff;
}

.plugin-list {
    display: grid;
    gap: 15px;
}

.plugin-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plugin-info h3 {
    margin-bottom: 5px;
}

.plugin-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.plugin-meta {
    font-size: 12px;
    color: #999;
}

.plugin-meta span {
    margin-right: 15px;
}

.plugin-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
