/* 管理员页面样式 */
.admin-page {
    background: var(--gradient);
    height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', "Microsoft YaHei", sans-serif;
}

.admin-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 登录框样式 */
.admin-login-box {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.admin-login-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.admin-logo {
    margin-bottom: 25px;
}

.admin-logo img {
    max-width: 150px;
    margin-bottom: 15px;
}

.admin-logo h2 {
    color: #2c3e50;
    font-size: 24px;
    margin: 0;
    font-weight: 600;
}

.admin-form .form-group {
    position: relative;
    margin-bottom: 20px;
    text-align: left;
}

.admin-form .form-group label {
    position: absolute;
    left: 15px;
    top: 12px;
    color: #7f8c8d;
}

.admin-form .form-group input[type="text"],
.admin-form .form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.admin-form .form-group input:focus {
    border-color: #3498db;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.5);
    outline: none;
}

.admin-form .remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.admin-form .remember-me input {
    margin-right: 10px;
}

.admin-form .remember-me label {
    position: static;
    color: #34495e;
    font-size: 14px;
}

.message-box {
    color: #e74c3c;
    margin-bottom: 15px;
    font-size: 14px;
    min-height: 20px;
}

.admin-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    width: 100%;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.admin-btn:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.admin-footer {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.admin-footer a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.admin-footer a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 管理后台样式 */
.admin-dashboard {
    background: #f5f6fa;
    min-height: 100vh;
    display: flex;
}

.admin-sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    padding: 20px 0;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
}

.admin-sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.admin-sidebar-header img {
    max-width: 120px;
    margin-bottom: 10px;
}

.admin-sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.admin-menu {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.admin-menu li {
    margin-bottom: 5px;
}

.admin-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.admin-menu a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.admin-menu a:hover,
.admin-menu a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding-left: 25px;
}

.admin-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: white;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.admin-header h2 {
    margin: 0;
    font-size: 22px;
    color: #2c3e50;
}

.admin-user-menu {
    position: relative;
}

.admin-user-info {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.admin-user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.admin-user-name {
    font-weight: 500;
    color: #2c3e50;
}

.admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.admin-card {
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    transition: all 0.3s ease;
}

.admin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.admin-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.admin-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 18px;
}

.admin-card-title {
    font-size: 16px;
    color: #7f8c8d;
    margin: 0;
}

.admin-card-value {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.admin-table-container {
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    overflow-x: auto;
}

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

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

.admin-table th {
    font-weight: 500;
    color: #7f8c8d;
    background: #f9f9f9;
}

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

.admin-table tr:hover td {
    background: #f5f6fa;
}

.admin-action-btn {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    margin-right: 10px;
    transition: color 0.3s ease;
}

.admin-action-btn:hover {
    color: #2980b9;
}

.admin-action-btn.delete {
    color: #e74c3c;
}

.admin-action-btn.delete:hover {
    color: #c0392b;
}

.admin-pagination {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.admin-pagination button {
    background: white;
    border: 1px solid #ddd;
    padding: 8px 12px;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-pagination button:hover,
.admin-pagination button.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 70px;
        padding: 20px 0;
    }
    
    .admin-sidebar-header h3,
    .admin-menu a span {
        display: none;
    }
    
    .admin-menu a i {
        margin-right: 0;
        font-size: 18px;
    }
    
    .admin-content {
        margin-left: 70px;
    }
    
    .admin-cards {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 576px) {
    .admin-login-box {
        padding: 20px;
    }
    
    .admin-content {
        padding: 15px;
    }
    
    .admin-cards {
        grid-template-columns: 1fr;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .admin-user-menu {
        margin-top: 15px;
    }
}