/* 后台管理系统样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* 头部样式 */
.admin-header-top {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-left {
    display: flex;
    align-items: center;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    padding: 8px;
    margin-right: 15px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.sidebar-toggle:hover {
    background-color: #f0f0f0;
}

.admin-title {
    font-size: 20px;
    color: #333;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.welcome-text {
    color: #666;
    font-size: 14px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-outline {
    background-color: transparent;
    color: #007bff;
    border: 1px solid #007bff;
}

.btn-outline:hover {
    background-color: #007bff;
    color: white;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

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

/* 侧边栏样式 */
.admin-sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    width: 250px;
    background: #2c3e50;
    color: white;
    overflow-y: auto;
    transition: transform 0.3s;
    z-index: 999;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #34495e;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
}

.logo i {
    margin-right: 10px;
    font-size: 20px;
    color: #3498db;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 5px;
}

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

.nav-link:hover {
    background-color: #34495e;
    color: white;
}

.nav-item.active .nav-link {
    background-color: #3498db;
    color: white;
}

.nav-link i {
    margin-right: 12px;
    width: 18px;
    text-align: center;
    font-size: 16px;
    display: inline-block;
    vertical-align: middle;
}

/* 主内容区域 */
.admin-container {
    display: flex;
    min-height: 100vh;
    padding-top: 60px;
}

.admin-main {
    flex: 1;
    margin-left: 250px;
    padding: 30px;
    background-color: #f8f9fa;
    min-height: calc(100vh - 60px);
}

.admin-header {
    margin-bottom: 30px;
}

.admin-header h1 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.admin-header p {
    color: #7f8c8d;
    font-size: 16px;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    transition: transform 0.3s;
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 24px;
    color: white;
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stat-info h3 {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-info p {
    color: #7f8c8d;
    font-size: 14px;
}

/* 仪表板内容 */
.dashboard-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.dashboard-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.section-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    font-size: 20px;
    color: #2c3e50;
}

/* 文章列表 */
.article-list {
    padding: 0;
}

.article-item {
    padding: 20px 25px;
    border-bottom: 1px solid #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.article-item:last-child {
    border-bottom: none;
}

.article-info h4 {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.article-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #7f8c8d;
}

.status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

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

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

.empty-state {
    padding: 40px;
    text-align: center;
    color: #7f8c8d;
}

/* 系统信息 */
.system-info {
    padding: 25px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item label {
    font-weight: 500;
    color: #2c3e50;
}

.info-item span {
    color: #7f8c8d;
}

/* 快速操作 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 25px;
}

.action-card {
    padding: 25px;
    text-align: center;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s;
}

.action-card:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.action-card i {
    font-size: 32px;
    color: #3498db;
    margin-bottom: 15px;
}

.action-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.action-card p {
    font-size: 14px;
    color: #7f8c8d;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
        padding: 20px 15px;
    }
    
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
}

/* FontAwesome 图标样式 - 使用纯CSS实现 */
.fas {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 表单样式 */
.content-section {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.content-section h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

.form-horizontal {
    max-width: 600px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

.form-actions {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* 表格样式 */
.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 4px;
    overflow: hidden;
}

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

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

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

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

.table a {
    color: #007bff;
    text-decoration: none;
}

.table a:hover {
    text-decoration: underline;
}

/* 状态标签 */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

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

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

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.info-icon {
    font-size: 24px;
    color: #007bff;
    margin-right: 15px;
    margin-top: 5px;
}

.info-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.info-content p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-icon {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #333;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}

.text-muted {
    color: #6c757d !important;
}

.text-primary {
    color: #007bff !important;
}

.text-primary:hover {
    color: #0056b3 !important;
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-buttons .btn {
    padding: 6px 10px;
    font-size: 12px;
}

/* 提示信息 */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

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

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

/* 快速操作按钮 */
.quick-add-buttons {
    margin-top: 20px;
}

.quick-add-buttons .btn {
    margin-right: 10px;
    margin-bottom: 10px;
}

/* 表格响应式 */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

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

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* 按钮样式增强 */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    margin: 0 2px;
}

.btn-primary {
    background: #007bff;
    border: 1px solid #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.btn-danger {
    background: #dc3545;
    border: 1px solid #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
}

/* 表单样式增强 */
.form-horizontal .form-group {
    margin-bottom: 20px;
}

.form-horizontal label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-horizontal input,
.form-horizontal select,
.form-horizontal textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-horizontal input:focus,
.form-horizontal select:focus,
.form-horizontal textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-table {
        font-size: 12px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 8px 10px;
    }
    
    .btn-sm {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* 站群管理页面专用样式修复 */
.admin-main[data-page="sites"] .content-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 25px;
}

.admin-main[data-page="sites"] .content-section h3 {
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.admin-main[data-page="sites"] .form-horizontal {
    max-width: 100%;
}

.admin-main[data-page="sites"] .form-horizontal .form-group {
    margin-bottom: 25px;
}

.admin-main[data-page="sites"] .form-horizontal label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.admin-main[data-page="sites"] .form-horizontal input,
.admin-main[data-page="sites"] .form-horizontal select,
.admin-main[data-page="sites"] .form-horizontal textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.admin-main[data-page="sites"] .form-horizontal input:focus,
.admin-main[data-page="sites"] .form-horizontal select:focus,
.admin-main[data-page="sites"] .form-horizontal textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.admin-main[data-page="sites"] .form-text {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

.admin-main[data-page="sites"] .form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* 表格样式优化 */
.admin-main[data-page="sites"] .table-responsive {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.admin-main[data-page="sites"] .admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    margin: 0;
}

.admin-main[data-page="sites"] .admin-table th,
.admin-main[data-page="sites"] .admin-table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.admin-main[data-page="sites"] .admin-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    border-bottom: 2px solid #e9ecef;
}

.admin-main[data-page="sites"] .admin-table tbody tr {
    transition: background-color 0.2s ease;
}

.admin-main[data-page="sites"] .admin-table tbody tr:hover {
    background: #f8f9fa;
}

.admin-main[data-page="sites"] .admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* 状态徽章优化 */
.admin-main[data-page="sites"] .status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-main[data-page="sites"] .status-active {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.admin-main[data-page="sites"] .status-inactive {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.admin-main[data-page="sites"] .badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.admin-main[data-page="sites"] .badge-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 文本样式 */
.admin-main[data-page="sites"] .text-muted {
    color: #6c757d !important;
    font-size: 12px;
}

.admin-main[data-page="sites"] .text-primary {
    color: #007bff !important;
    text-decoration: none;
}

.admin-main[data-page="sites"] .text-primary:hover {
    color: #0056b3 !important;
    text-decoration: underline;
}

/* 按钮优化 */
.admin-main[data-page="sites"] .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-main[data-page="sites"] .btn-primary {
    background: #007bff;
    color: white;
}

.admin-main[data-page="sites"] .btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

.admin-main[data-page="sites"] .btn-sm {
    padding: 6px 10px;
    font-size: 11px;
    margin: 0 2px;
}

.admin-main[data-page="sites"] .btn-danger {
    background: #dc3545;
    color: white;
}

.admin-main[data-page="sites"] .btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220,53,69,0.3);
}

/* 信息网格优化 - 使用说明版块 */
.admin-main[data-page="sites"] .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.admin-main[data-page="sites"] .info-item {
    display: flex;
    align-items: flex-start;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 4px solid #007bff;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.admin-main[data-page="sites"] .info-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.admin-main[data-page="sites"] .info-item:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,123,255,0.15);
    border-color: #007bff;
}

.admin-main[data-page="sites"] .info-item:hover::before {
    transform: scaleX(1);
}

.admin-main[data-page="sites"] .info-icon {
    font-size: 32px;
    color: #007bff;
    margin-right: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.admin-main[data-page="sites"] .info-item:hover .info-icon {
    color: #0056b3;
    transform: scale(1.1);
}

.admin-main[data-page="sites"] .info-content h4 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    transition: color 0.3s ease;
}

.admin-main[data-page="sites"] .info-item:hover .info-content h4 {
    color: #007bff;
}

.admin-main[data-page="sites"] .info-content p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.7;
    transition: color 0.3s ease;
}

.admin-main[data-page="sites"] .info-item:hover .info-content p {
    color: #495057;
}

/* 空状态优化 */
.admin-main[data-page="sites"] .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    background: #f8f9fa;
    border-radius: 10px;
    margin: 20px 0;
    border: 2px dashed #dee2e6;
}

.admin-main[data-page="sites"] .empty-state .empty-icon {
    font-size: 64px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.admin-main[data-page="sites"] .empty-state h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #2c3e50;
    border: none;
    padding: 0;
    font-weight: 600;
}

.admin-main[data-page="sites"] .empty-state p {
    margin: 0;
    font-size: 14px;
    color: #7f8c8d;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-main[data-page="sites"] .content-section {
        padding: 20px;
    }
    
    .admin-main[data-page="sites"] .info-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-main[data-page="sites"] .admin-table {
        font-size: 12px;
    }
    
    .admin-main[data-page="sites"] .admin-table th,
    .admin-main[data-page="sites"] .admin-table td {
        padding: 10px 8px;
    }
    
    .admin-main[data-page="sites"] .info-item {
        padding: 20px;
    }
    
    .admin-main[data-page="sites"] .info-icon {
        font-size: 24px;
        margin-right: 15px;
    }
}